OFFSET
1,1
COMMENTS
Equivalently, primes p such that p, p+4, p+10, p+16 and p+18 are consecutive primes.
All terms == 13 (mod 30). - Robert Israel, Oct 17 2023
LINKS
Jon E. Schoenfield, Table of n, a(n) for n = 1..10000 (first 1000 terms from Robert Israel)
EXAMPLE
43 is in the sequence since 43, 47 = 43 + 4, 53 = 43 + 10, 59 = 43 + 16 and 61 = 43 + 18 are consecutive primes.
MAPLE
L:= [0$5]:
p:= 1: R:= NULL: count:= 0:
while count < 100 do
p:= nextprime(p);
L:= [L[2], L[3], L[4], L[5], p];
if L -~ L[1] = [0, 4, 10, 16, 18] then
count:= count+1;
R:= R, L[1];
fi
od:
R; # Robert Israel, Oct 17 2023
MATHEMATICA
Select[Partition[Prime[Range[50000]], 5, 1], Differences[#]=={4, 6, 6, 2}&][[All, 1]] (* Harvey P. Dale, Jan 23 2021 *)
PROG
(PARI) list(lim) = {my(p1 = 2, p2 = 3, p3 = 5, p4 = 7); forprime(p5 = 11, lim, if(p2 - p1 == 4 && p3 - p2 == 6 && p4 - p3 == 6 && p5 - p4 == 2, print1(p1, ", ")); p1 = p2; p2 = p3; p3 = p4; p4 = p5); } \\ Amiram Eldar, Feb 21 2025
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Labos Elemer, Dec 19 2002
EXTENSIONS
Edited by Dean Hickerson, Dec 20 2002
STATUS
approved