OFFSET
1,1
LINKS
T. Forbes, Prime k-tuplets
Eric Weisstein's World of Mathematics, Prime Triplet.
EXAMPLE
The first 4 terms of the sequence are 12, 210, 1050, 330, since the gaps between first elements of the first five quintuples {5,7,11,17,19}, {17,19,23,29,31}, {227,229,233,239,241}, {1277,1279,1283,1289,1291}, {1607,1609,1613,1619,1621} are, 17-5=12, 227-17=210, etc.
MAPLE
b:= proc(n) option remember; local p; p:= `if`(n=1, 1, b(n-1));
do p:= nextprime(p);
if andmap(isprime, [p+2, p+6, p+12, p+14]) then return p fi
od
end:
a:= n-> b(n+1)-b(n):
seq(a(n), n=1..65); # Alois P. Heinz, Mar 14 2021
MATHEMATICA
b[n_] := b[n] = Module[{p}, p = If[n == 1, 1, b[n-1]]; While[True, p = NextPrime[p]; If[AllTrue[{p+2, p+6, p+12, p+14}, PrimeQ], Return[p]]]];
a[n_] := b[n+1]-b[n];
Table[a[n], {n, 1, 65}] (* Jean-François Alcover, May 14 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
James S. DeArmon, Mar 14 2021
STATUS
approved