A368640 a(0) = 2; for n > 0, a(n) is the smallest prime that differs from the next prime by 2n and is not part of a run of 3 or more consecutive primes in arithmetic progression, or -1 if no such prime exists.
2, 11, 7, 23, 89, 139, 467, 113, 1831, 523, 887, 1129, 1669, 2477, 2971, 4297, 5591, 1327, 9551, 30593, 19333, 16141, 15683, 81463, 28229, 31907, 19609, 35617, 82073, 44293, 43331, 34061, 89689, 162143, 134513, 173359, 31397, 404597, 212701, 188029, 542603, 265621
Offset: 0
Keywords
Examples
a(1) is the smallest prime that differs from the next prime by 2 and is not part of a run of 3 or more consecutive primes in arithmetic progression. (Thus a(1) is the smallest prime p that is the lesser of a twin prime pair (p,q) (cf. A001359) where neither p nor q is part of another twin prime pair.) The primes 3, 5, 7 are in arithmetic progression with difference 2, so none of those primes is a(1); the smallest prime that meets the requirements is 11, so a(1) = 11. a(6) is the smallest prime that differs from the next prime by 12 and is not part of a run of 3 or more consecutive primes in arithmetic progression. Primes that differ from the next prime by 12 are 199, 211, 467, 509, 619, ... (cf. A031930), but 199 and 211 are part of a run of three consecutive primes in arithmetic progression (199, 211, and 223). Thus, since PreviousPrime(467) != 455 and NextPrime(479) != 491, 467 is not in a run of three or more consecutive primes in arithmetic progression, so a(6) = 467.
Formula
a(n) >= A000230(n).
Comments