OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
{x| both x and x+12 are safe primes}; Intersection(12+A005385, primes)
EXAMPLE
11 and 23 are consecutive safe primes but not consecutive primes; 467 and 479 are consecutive safe primes and consecutive primes as well. Both 11 and 467 are here.
MATHEMATICA
seqQ[n_] := And @@ PrimeQ[{n, n+12, (n-1)/2, (n+11)/2}]; Select[Range[165000], seqQ] (* Amiram Eldar, Jan 13 2020 *)
PROG
(Magma) [p:p in PrimesUpTo(165000)| IsPrime(p+12) and IsPrime((p-1) div 2) and IsPrime( (p+11) div 2)]; // Marius A. Burtea, Jan 13 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Jan 26 2001
EXTENSIONS
Offset corrected by Amiram Eldar, Jan 13 2020
STATUS
approved