OFFSET
1,1
COMMENTS
These 4 elements are not necessarily consecutive primes.
A342309(d) gives the first element of the smallest AP with 4 elements whose common difference is a(n) = d.
LINKS
Diophante, A1880. NP en PA (prime numbers in arithmetic progression) (in French).
Wikipedia, Primes in arithmetic progression.
FORMULA
m is a term iff A123556(m) = 4.
EXAMPLE
d = 18 is a term because the largest possible APs of primes with common difference d = 18 have all 4 elements; the first such APs start with 5, 43, 53, ... The smallest one is (5, 23, 41, 59) then 77 is composite.
d = 24 is another term because the largest possible APs of primes with common difference d = 24 have all 4 elements; the first such APs start with 59, 79, 349, ... The smallest one is (59, 83, 107, 131) then 155 is composite.
PROG
(PARI) isok(d) = (d%5) && !(d%6) && !(isprime(5+d) && isprime(5+2*d) && isprime(5+3*d) && isprime(5+4*d)); \\ Michel Marcus, Jan 23 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Bernard Schott, Jan 23 2023
STATUS
approved