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”).

A240709
Primes p such that no number among p+-6 and p+-12 is also a prime.
2
2, 3, 523, 617, 691, 701, 709, 719, 743, 787, 911, 937, 967, 1153, 1171, 1259, 1381, 1399, 1409, 1637, 1667, 1723, 1787, 1831, 1847, 1931, 1933, 1949, 1951, 2053, 2113, 2161, 2179, 2203, 2221, 2311, 2437, 2477, 2503, 2521, 2593, 2617, 2749, 2767, 2819, 2833
OFFSET
1,1
COMMENTS
The union of A240709 and A240710 is the set of all prime numbers, i.e., A000040.
EXAMPLE
For 2, 2+-6 and 2+-12 are all even numbers and composite. So 2 is included.
For 3, 3+-6 and 3+-12 are all multiples of 3. So 3 is included.
For each prime number p between 5 and 521, at least one number among p+-6 and p+-12 is a prime number, thus p is excluded.
For 523, 523 - 12 = 511 = 7*73, 523 - 6 = 517 = 11*47, 523 + 6 = 529 = 23^2, 523 + 12 = 535 = 5*107. They are all composites. So 523 is included.
MATHEMATICA
p = 1; Table[While[p = NextPrime[p]; ok = 0; a1 = p - 12; a2 = p - 6; a3 = p + 6; a4 = p + 12; If[a1 > 0, If[PrimeQ[a1], ok = 1]]; If[a2 > 0, If[PrimeQ[a2], ok = 1]]; If[PrimeQ[a3], ok = 1]; If[PrimeQ[a4], ok = 1]; ok != 0]; p, {n, 1, 46}]
CROSSREFS
Sequence in context: A090510 A348360 A004887 * A264577 A165770 A226148
KEYWORD
nonn,easy
AUTHOR
Lei Zhou, Apr 10 2014
STATUS
approved