%I
%S 4,10,25,34,38,46,55,57,77,91,93,106,118,123,129,133,143,145,159,161,
%T 169,177,185,201,203,205,206,213,218,226,235,259,267,289,291,295,298,
%U 305,314,327,334,335,339,358,361,365,377,381,394,395,403,407,415,417
%N Sophie Germain semiprimes: semiprimes n such that 2n+1 is also a semiprime.
%C Define a generalized Sophie Germain nprime of degree m, p, to be an nprime (nalmost prime) such that 2p+1 is an mprime (malmost prime). For example, p=24 is a Sophie Germain 4prime of degree 2 because 24 is a 4prime and 2*24+1=49 is a 2prime. Then this sequence gives all the Sophie Germain 2primes of degree 2.
%H Marius A. Burtea, <a href="/A111153/b111153.txt">Table of n, a(n) for n = 1..7675</a> (first 1000 terms from T. D. Noe)
%F a(n) = (A176896(n)  1)/2.  _Zak Seidov_, Sep 10 2012
%e a(4)=34 because 34 is the 4th semiprime such that 2*34+1=69 is also a semiprime.
%p with(numtheory): P:=proc(n) if bigomega(n)=2 and bigomega(2*n+1)=2
%p then n; fi; end: seq(P(i),i=1..10^4); # _Paolo P. Lava_, Mar 10 2017
%t SemiPrimeQ[n_] := (Plus@@Transpose[FactorInteger[n]][[2]]==2); Select[Range[2, 500], SemiPrimeQ[ # ]&&SemiPrimeQ[2#+1]&] (* _T. D. Noe_, Oct 20 2005 *)
%t fQ[n_] := Plus @@ Last /@ FactorInteger[n] == 2; Select[ Range[445], fQ[ # ] && fQ[2# + 1] &] (* _Robert G. Wilson v_, Oct 20 2005 *)
%o (MAGMA) f:=func< n  &+[k[2]: k in Factorization(n)] eq 2 >; [ n: n in [4..500]  f(n) and f(2*n+1)]; // _Marius A. Burtea_, Jan 04 2019
%o (PARI) isok(n) = (bigomega(n) == 2) && (bigomega(2*n+1) == 2); \\ _Michel Marcus_, Jan 04 2019
%Y Cf. A005384, A001358, A111168, A111170, A111171, A111173, A111176, A176896.
%K nonn
%O 1,1
%A Christopher M. Tomaszewski (cmt1288(AT)comcast.net), Oct 19 2005
%E Corrected and extended by _T. D. Noe_, _Ray Chandler_ and _Robert G. Wilson v_, Oct 20 2005
