login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Safe primes which are also Sophie Germain primes.
37

%I #58 Apr 03 2023 10:36:09

%S 5,11,23,83,179,359,719,1019,1439,2039,2063,2459,2819,2903,2963,3023,

%T 3623,3779,3803,3863,4919,5399,5639,6899,6983,7079,7643,7823,10163,

%U 10799,10883,11699,12203,12263,12899,14159,14303,14699,15803,17939

%N Safe primes which are also Sophie Germain primes.

%C Primes p such that both (p-1)/2 and 2*p+1 are prime.

%C Intersection of A005384 and A005385.

%C Except for 5, all are congruent to 11 modulo 12.

%C Primes "inside" Cunningham chains of first kind.

%C A156660(a(n))*A156659(a(n)) = 1; A156877 gives numbers of these numbers <= n. - _Reinhard Zumkeller_, Feb 18 2009

%C Infinite under Dickson's conjecture. - _Charles R Greathouse IV_, Jul 18 2012

%C See A162019 for the subset of a(n) that are "reproduced" by the application of the transformations (a(n)-1)/2 and 2*a(n)+1 to the set a(n). - _Richard R. Forberg_, Mar 05 2015

%H T. D. Noe, <a href="/A059455/b059455.txt">Table of n, a(n) for n = 1..1000</a>

%H C. K. Caldwell, <a href="https://t5k.org/glossary/page.php?sort=CunninghamChain">Cunningham Chains</a>

%e 83 is a term because 2*83+1=167 and (83-1)/2=41 are both primes.

%t lst={}; Do[p=Prime[n]; If[PrimeQ[(p-1)/2]&&PrimeQ[2*p+1], AppendTo[lst, p]], {n, 7!}]; lst (* _Vladimir Joseph Stephan Orlovsky_, Dec 02 2008 *)

%t Select[Prime[Range[1000]], AllTrue[{(# - 1)/2, 2 # + 1}, PrimeQ] &] (* requires Mathematica 10+; _Feras Awad_, Dec 19 2018 *)

%o (PARI) forprime(p=2,1e5,if(isprime(p\2)&&isprime(2*p+1),print1(p", "))) \\ _Charles R Greathouse IV_, Jul 15 2011

%o (Magma) [p: p in PrimesUpTo(20000) |IsPrime((p-1) div 2) and IsPrime(2*p+1)]; // _Vincenzo Librandi_, Oct 31 2014

%o (Python)

%o from itertools import count, islice

%o from sympy import isprime, prime

%o def A059455_gen(): # generator of terms

%o return filter(lambda p:isprime(p>>1) and isprime(p<<1|1),(prime(i) for i in count(1)))

%o A059455_list = list(islice(A059455_gen(),10)) # _Chai Wah Wu_, Jul 12 2022

%Y Cf. A005384, A005385, A053176, A059452-A059456, A007700, A005602, A023272, A023302, A023330, A156659, A156660, A156877, A162019.

%K nonn

%O 1,1

%A _Labos Elemer_, Feb 02 2001