login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A256454
a(n) = smallest prime(j) > a(n-1) such that prime(j+1) - prime(j) = 2n, a(0) = 2.
2
2, 3, 7, 23, 89, 139, 199, 293, 1831, 1913, 3089, 3229, 4177, 5531, 5953, 6491, 10799, 11743, 12853, 30593, 33247, 34981, 36389, 81463, 86629, 95651, 103237, 106033, 153191, 181303, 189067, 190409, 288583, 294563, 326369, 399283, 507217, 514967, 570253, 642281, 815729, 841459, 979567
OFFSET
0,1
LINKS
Bill McEachen and Robert G. Wilson v, Table of n, a(n) for n = 0..180
FORMULA
a(n) = A253899(n) - 2n for n > 0.
EXAMPLE
a(4) = 89 since 89=97-8, and this is the first time this gap is seen after smaller gaps of 1,2,4,6 are satisfied.
MATHEMATICA
lst = {2}; p = 2; q = 3; gp = 2; While[ gp != 86, While[q - p != gp, p = q; q = NextPrime@ p]; AppendTo[lst, p]; Print@ p; gp += 2]; lst
PROG
(Python) from sympy import sieve
A256454 = [2]
for j in range(2, 90000):
if sieve[j+1] - sieve[j] == 2 * len(A256454): A256454.append(sieve[j])
print(A256454) # Karl-Heinz Hofmann, May 03 2022
CROSSREFS
Cf. A000230, A000101, A253899 (upper end).
Sequence in context: A335366 A002386 A000230 * A133429 A087770 A237359
KEYWORD
nonn
AUTHOR
STATUS
approved