A215642 Primes p such that there is no D such that p+D, p-D, p+2*D, p-2*D are all primes.
2, 3, 5, 7, 11, 13, 19, 23, 31, 37, 41, 43, 47, 53, 59, 61, 73, 79, 83, 103, 107, 109, 113, 127, 137, 139, 149, 151, 157, 179, 181, 199, 223, 227, 229, 239, 251, 271, 277, 281, 293, 311, 331, 349, 353, 359, 367, 379, 383, 389, 397, 401, 409, 421, 431, 439, 487, 499, 541
Offset: 1
Keywords
Examples
17 doesn't occur in the sequence, because there is D=6: 17-12, 17-6, 17+6 and 17+12 are all primes: 5, 11, 23, 29.
Links
- Joerg Arndt, Table of n, a(n) for n = 1..243
Crossrefs
Cf. A078611.
Programs
-
Mathematica
fQ[p_] := Module[{d = 1}, While[4d < p && !(PrimeQ[p-4d] && PrimeQ[p-2d] && PrimeQ[p+2d] && PrimeQ[p+4d]), d++]; 4d > p]; Select[Prime[Range[4000]], fQ] (* T. D. Noe, Aug 20 2012 *)
-
PARI
N=10^9; default(primelimit,N); print1(2,", "); { forprime (p=3, N, D=2; D2 = D << 1; t = 1; while ( p > D2, if ( isprime(p+D) & isprime(p-D) & isprime(p+D2) & isprime(p-D2) , /* then */ t=0; break() ); D += 2; D2 += 4; ); if ( t==1, print1(p,", ") ); ); } /* Joerg Arndt, Aug 20 2012 */
Comments