%I #20 Apr 06 2023 15:14:50
%S 5,29,2549,6269,41609,259379,418349,492059,514049,521879,819029,
%T 1171199,1659809,1994339,2014139,2325509,2327399,2392139,2420699,
%U 2481179,2844269,3142829,3393359,3637169,3990029
%N Smallest member of Sophie Germain pair, where each member of the prime pair is the smallest of its prime triple (p, p+2, p+8).
%C It is not known if there are infinitely many Sophie Germain pairs with this property.
%C The sequence is infinite under Dickson's conjecture. Aside from a(1) = 5, all terms are 29 or 179 mod 210. - _Charles R Greathouse IV_, Feb 05 2014
%H Abhiram R Devesh and Charles R Greathouse IV, <a href="/A237188/b237188.txt">Table of n, a(n) for n = 1..10000</a> (first 135 terms from Devesh)
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/SophieGermainPrime.html">Sophie Germain Prime</a>
%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Sophie_Germain_prime">Sophie Germain prime</a>
%e a(1): p = 5; (2*p)+1 = 11
%e Prime triples (5,7,13);(11,13,19)
%e a(2): p = 29; (2*p)+1=59
%e Prime triples (29,31,37);(59,61,67)
%t sgpQ[n_]:=Module[{sg=2n+1},AllTrue[Flatten[{sg+{0,2,8},n+{2,8}}], PrimeQ]]; Select[Prime[ Range[ 300000]],sgpQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Feb 02 2016 *)
%o (Python)
%o p1=2
%o n=2
%o count=0
%o while p1>2:
%o ....## Generate the a chain of numbers with length 4
%o ....cc=[]
%o ....cc.append(p1)
%o ....for i in range(1, n):
%o ........cc.append((2**(i)*p1+((2**i)-1)))
%o ....## chain entries + 2
%o ....cc2=[c+2 for c in cc]
%o ....## chain entries + 8
%o ....cc8=[c+8 for c in cc]
%o ....## check if cc is a Sophie Germain Pair or not
%o ....## pf.isp_list returns True or false for a given list of numbers
%o ....## if they are prime or not
%o ....##
%o ....pcc=pf.isp_list(cc)
%o ....pcc2=pf.isp_list(cc2)
%o ....pcc8=pf.isp_list(cc8)
%o ....## Number of primes for cc
%o ....npcc=pcc.count(True)
%o ....## Number of primes for cc2
%o ....npcc2=pcc2.count(True)
%o ....## Number of primes for cc8
%o ....npcc8=pcc8.count(True)
%o ....if npcc==n and npcc2==n and npcc8==n:
%o ........print "For length ", n, " the series is : ", cc, " ,", cc2," and ",cc8
%o ....p1=pf.nextp(p1)
%o (PARI) is(n)=isprime(n) && isprime(n+2) && isprime(n+8) && isprime(2*n+1) && isprime(2*n+3) && isprime(2*n+9) \\ _Charles R Greathouse IV_, Feb 05 2014
%Y Cf. A005384.
%K nonn
%O 1,1
%A _Abhiram R Devesh_, Feb 04 2014