OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
The pairs (5,7) and (7,11) are omitted, albeit are both consecutive primes and consecutive safe primes, however their distances (2 and 4) are singular. Cases [467, 439] and [20738027, 20738039] are pairs are both consecutive of consecutive primes and consecutive safe primes in minimal distance=12. The corresponding twins of Sophie Germain primes are [233, 239] or [1369013, 1369019] in distance 6.
MATHEMATICA
safeQ[p_] := PrimeQ[(p-1)/2]; seq={}; c=0; p1 = p2 = 11; q1 = safeQ[p1]; While[c < 30, p2 = NextPrime[p2]; q2 = safeQ[p2]; If[q1 && q2 && p2 == p1 + 12, c++; AppendTo[seq, p1]]; p1 = p2; q1 = q2]; seq (* Amiram Eldar, Jan 13 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Jan 29 2001
STATUS
approved