A360735 Even integers d such that the longest possible arithmetic progression (AP) of primes with common difference d has only two elements.
16, 22, 26, 32, 44, 46, 52, 56, 58, 62, 70, 74, 76, 82, 86, 88, 92, 100, 106, 112, 116, 118, 122, 128, 130, 136, 140, 142, 146, 148, 152, 158, 160, 166, 170, 172, 176, 182, 184, 194, 196, 200, 202, 206, 212, 214, 218, 224, 226, 232, 236, 242, 244, 250, 254, 256, 262, 266, 268
Offset: 1
Keywords
Examples
d = 16 is a term because the first longest APs of primes with common difference 16 are (3, 19), (7,23), (13, 29), ... and all have 2 elements because next elements should be respectively 35, 39 and 45 that are all composite; the first such AP that starts with A342309(16) = 3 is (3, 19). d = 22 is a term because the first longest APs of primes with common difference 22 are (7, 29), (19, 41), (31, 53), ... and all have 2 elements because next elements should be respectively 51, 63 and 75 that are all composite; the first such AP that starts with A342309(22) = 7 is (7, 29).
Links
Programs
-
Maple
filter := d -> (irem(d, 2) = 0) and (irem(d, 3) <> 0) and not isprime(3+d) or isprime(3+d) and not isprime(3+2*d) : select(filter, [`$`(1 .. 270)]); isA360735 := d -> isA047235(d) and not isA206037(d): # Peter Luschny, Mar 03 2023
-
Mathematica
Select[Range[2, 270, 2], Mod[#, 3] > 0 && Nand @@ PrimeQ[{# + 3, 2*# + 3}] &] (* Amiram Eldar, Mar 03 2023 *)
-
PARI
isok(d) = !(d%2) && (d%3) && !(isprime(d+3) && isprime(2*d+3)); \\ Michel Marcus, Mar 03 2023
Comments