This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A368640 #9 Jan 01 2024 22:46:44 %S A368640 2,11,7,23,89,139,467,113,1831,523,887,1129,1669,2477,2971,4297,5591, %T A368640 1327,9551,30593,19333,16141,15683,81463,28229,31907,19609,35617, %U A368640 82073,44293,43331,34061,89689,162143,134513,173359,31397,404597,212701,188029,542603,265621 %N 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. %C A368640 Equivalently, a(0) = 2, and for n > 0, a(n) is the smallest prime p such that NextPrime(p) - p = 2n but neither p - PreviousPrime(p) nor NextPrime(NextPrime(p)) - NextPrime(p) is equal to 2n, or -1 if no such prime p exists. %C A368640 Stated yet another way: define an array A such that A(i,j) is the smallest prime that is at the start of a run of exactly i consecutive prime gaps of size exactly j, or -1 if no such prime exists; then a(0) = 2 and, for n > 0, a(n) = A(1,2n). %C A368640 Conjecture: a(n) is never -1. %F A368640 a(n) >= A000230(n). %e A368640 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. %e A368640 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. %Y A368640 Cf. A000040, A000230, A001359, A006560, A031930. %K A368640 nonn %O A368640 0,1 %A A368640 _Jon E. Schoenfield_, Jan 01 2024