OFFSET
1,1
COMMENTS
The computations were done without any assumptions on the form of d.
All terms are multiples of 6. - Zak Seidov, Jan 07 2014
Equivalently, integers d such that the largest possible arithmetic progression (AP) of primes with common difference d has exactly 5 elements (see example). These 5 elements are not necessarily consecutive primes. In fact, for each term d, there exists only one such AP of primes, and this one always starts with A342309(d) = 5, so this unique AP is (5, 5+d, 5+2d, 5+3d, 5+4d). - Bernard Schott, Jan 25 2023
LINKS
Sameen Ahmed Khan, Table of n, a(n) for n = 1..10000
Diophante, A1880. NP en PA (prime numbers in arithmetic progression) (in French).
Sameen Ahmed Khan, Primes in Geometric-Arithmetic Progression, arXiv preprint arXiv:1203.2083 [math.NT], 2012. - From N. J. A. Sloane, Sep 15 2012
Wikipedia, Primes in arithmetic progression.
FORMULA
m is a term iff A123556(m) = 3. - Bernard Schott, Jan 25 2023
EXAMPLE
d = 12 then {5, 5 + 1*12, 5 + 2*12, 5 + 3*12, 5 + 4*12} = {5, 17, 29, 41, 53}, which is 5 primes in arithmetic progression.
MAPLE
filter := d -> isprime(5+d) and isprime(5+2*d) and isprime(5+3*d) and isprime(5+4*d) : select(filter, [$(1 .. 10000)]); # Bernard Schott, Jan 25 2023
MATHEMATICA
t={}; Do[If[PrimeQ[{5, 5 + d, 5 + 2*d, 5 + 3*d, 5 +4*d}] == {True, True, True, True, True}, AppendTo[t, d]], {d, 10000}]; t
Select[Range[10000], AllTrue[5+#*Range[0, 4], PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, May 09 2015 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Sameen Ahmed Khan, Feb 03 2012
STATUS
approved