2, 3, 2, 3, 2, 5, 1, 3, 2, 3, 2, 5, 1, 3, 2, 2, 2, 4, 1, 3, 2, 2, 1, 4, 1, 2, 2, 3, 2, 6, 1, 2, 1, 3, 2, 4, 1, 3, 2, 3, 2, 5, 1, 2, 2, 2, 1, 5, 1, 3, 2, 2, 1, 4, 1, 2, 2, 2, 2, 6, 1, 2, 1, 3, 2, 4, 1, 3, 2, 2, 2, 4, 1, 2, 1, 2, 2, 4, 1, 3, 2, 2, 1, 4, 1, 2, 2, 2, 1, 6, 1, 2, 1, 3, 2, 5, 1, 3, 2, 2, 2, 4, 1, 3, 2
Offset: 1
a(1) = 2 for the AP (arithmetic progression) (2, 3) with A342309(1) = 2.
a(2) = 3 for the AP (3, 5, 7) with A342309(2) = 3.
a(3) = 2 for the AP (2, 5) with A342309(3) = 2.
a(6) = 5 for the AP (5, 11, 17, 23, 29) with A342309(6) = 5.
a(7) = 1 for the AP (2) with A342309(7) = 2.
a(18) = 4 for the AP (5, 23, 41, 59) with A342309(18) = 5.
a(30) = 6 for the AP (7, 37, 67, 97, 127, 157) with A342309(30) = 7.
a(150) = 7 for the AP (7, 157, 307, 457, 607, 757, 907) with A342309(150) = 7.
From _Bernard Schott_, Feb 25 2023: (Start)
For n = 12, p = A053669(12) = 5 and the AP (5, 17, 29, 41, 53) has 5 elements that are primes (the next should be 65 = 5*13), so a(12) = 5. This AP is the unique longest possible AP of primes with a common difference n = 12.
For n = 30, p = A053669(30) = 7 and the AP (7, 37, 67, 97, 127, 157) has 7-1 = 6 elements that are primes (the next should be 187 = 11*17) so a(30) = 6. Also, there are infinitely many such longest APs with common difference 30 and 6 elements. These other longest APs start with primes q that are > p = 7. The first few next q are 107, 359, 541, 2221, 6673, 7457, ...
For n = 60, p = A053669(60) = 7 and the longest AP that starts with 7 is (7, 67, 127) has only 3 elements that are primes (the next should be 187 = 11*17) so a(60) = 6. Also, there are infinitely many such longest APs with common difference 60 and 6 elements. All these longest APs start with primes q that are > p = 7. The first few such q are 11, 53, 641, 5443, 10091, 12457, ... and the smallest such AP is (11, 71, 131, 191, 251, 311). (End)
Comments