OFFSET
1,1
COMMENTS
Primes in the quadruple need not be sequential primes.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
James S. DeArmon, Perl program
Eric Weisstein's World of Mathematics, Prime Triplet
EXAMPLE
The first 6 quadruples are (5,7,11,17), (11,13,17,23), (17,19,23,29), (41,43,47,53), (101,103,107,113), (227,229,233,239), so the first 5 terms of the sequence are 11-5=6, 17-11=6, 41-17=24, 101-41=60, 227-101=126.
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]) then return p fi
od
end:
a:= n-> b(n+1)-b(n):
seq(a(n), n=1..65); # Alois P. Heinz, Feb 14 2021
MATHEMATICA
Differences[Select[Prime[Range[5000]], AllTrue[#+{2, 6, 12}, PrimeQ]&]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 21 2021 *)
PROG
(Perl) See links.
CROSSREFS
KEYWORD
nonn
AUTHOR
James S. DeArmon, Feb 07 2021
STATUS
approved