OFFSET
1,1
COMMENTS
Except for p=3, the three primes must be p+10, p+30 and p+40, because one of p, p+10, p+20 is divisible by 3, and one of p+20, p+30 and p+40 is divisible by 3.
All terms except 3 are == 1 (mod 3).
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(3) = 13 is a term because 13, 23, 43 and 53 are all prime.
MAPLE
R:= 3: count:= 1:
for p from 7 by 6 while count < 300 do
if andmap(isprime, [p, p+10, p+30, p+40]) then
count:= count+1; R:= R, p
fi
od:
R;
MATHEMATICA
Select[Prime[Range[2000]], Total[Boole[PrimeQ[#+{10, 20, 30, 40}]]]==3&] (* Harvey P. Dale, Aug 04 2021 *)
PROG
(Python)
from sympy import isprime, primerange
def ok(p): return sum(isprime(p+i*10) for i in range(1, 5)) >= 3
def aupto(lim): return [p for p in primerange(1, lim+1) if ok(p)]
print(aupto(13681)) # Michael S. Branicky, Mar 02 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Mar 01 2021
STATUS
approved