login
A356079
Primes p such that p+6, p-6, 2*p+3 and 2*p-3 are prime.
2
13, 17, 53, 67, 157, 563, 613, 647, 1187, 1453, 1663, 4007, 4133, 5443, 5743, 6073, 6863, 7823, 8747, 11833, 12113, 12583, 12653, 15467, 21997, 23747, 25463, 25673, 26183, 41017, 42683, 59447, 60337, 65173, 67427, 68443, 75527, 80783, 89527, 94433, 95917, 100517, 101203, 104003, 110603, 111773
OFFSET
1,1
COMMENTS
p, q, 2*p+q, 2*p-q, p+2*q and p-2*q are all prime if and only if q = 3 and p is in this sequence.
LINKS
EXAMPLE
a(3) = 53 is a term because 53, 53+6 = 59, 53-6 = 47, 2*53 + 3 = 109 and 2*53 - 3 = 103 are all prime.
MAPLE
filter:= proc(p) andmap(isprime, [p, p+6, p-6, 2*p+3, 2*p-3]) end proc:
select(filter, [seq(i, i=3..200000, 2)]);
MATHEMATICA
Select[Prime[Range[10^4]], AllTrue[{# - 6, # + 6, 2*# - 3, 2*# + 3}, PrimeQ] &] (* Amiram Eldar, Jul 25 2022 *)
PROG
(Python)
from sympy import isprime
def ok(p): return all(isprime(k) for k in [p, p+6, p-6, 2*p+3, 2*p-3])
print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Jul 25 2022
CROSSREFS
Sequence in context: A180527 A076789 A089577 * A214393 A060569 A108265
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jul 25 2022
STATUS
approved