OFFSET
1,1
COMMENTS
The computations were done without any assumptions on the form of d.
All terms are multiples of 30. - Zak Seidov, Jan 07 2014.
Equivalently, integers d such that the longest possible arithmetic progression (AP) of primes with common difference d has exactly 7 elements (see example). These 7 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) = 7, so this unique AP is (7, 7+d, 7+2d, 7+3d, 7+4d, 7+5d, 7+6d). - Bernard Schott, Feb 12 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) = 7. - Bernard Schott, Feb 12 2023
EXAMPLE
d = 150 then {7, 7 + 1*150, 7 + 2*150, 7 + 3*150, 7 + 4*150, 7 + 5*150, + 7 + 6*150} = {7, 157, 307, 457, 607, 757, 907} which is 7 primes in arithmetic progression.
MAPLE
filter := d -> isprime(7+d) and isprime(7+2*d) and isprime(7+3*d) and isprime(7+4*d) and isprime(7+5*d) and isprime(7+6*d): select(filter, [$(1 .. 1700000)]); # Bernard Schott, Feb 13 2023
MATHEMATICA
a = 7; t = {}; Do[If[PrimeQ[{a, a + d, a + 2*d, a + 3*d, a + 4*d, a + 5*d, a + 6*d}] == {True, True, True, True, True, True, True}, AppendTo[t, d]], {d, 200000}]; t
CROSSREFS
KEYWORD
nonn
AUTHOR
Sameen Ahmed Khan, Feb 03 2012
STATUS
approved