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”).
%I #19 May 03 2022 23:15:49
%S 2,3,7,23,89,139,199,293,1831,1913,3089,3229,4177,5531,5953,6491,
%T 10799,11743,12853,30593,33247,34981,36389,81463,86629,95651,103237,
%U 106033,153191,181303,189067,190409,288583,294563,326369,399283,507217,514967,570253,642281,815729,841459,979567
%N a(n) = smallest prime(j) > a(n-1) such that prime(j+1) - prime(j) = 2n, a(0) = 2.
%H Bill McEachen and Robert G. Wilson v, <a href="/A256454/b256454.txt">Table of n, a(n) for n = 0..180</a>
%F a(n) = A253899(n) - 2n for n > 0.
%e 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.
%t 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
%o (Python) from sympy import sieve
%o A256454 = [2]
%o for j in range(2,90000):
%o if sieve[j+1] - sieve[j] == 2 * len(A256454): A256454.append(sieve[j])
%o print(A256454) # _Karl-Heinz Hofmann_, May 03 2022
%Y Cf. A000230, A000101, A253899 (upper end).
%K nonn
%O 0,1
%A _Bill McEachen_ and _Robert G. Wilson v_, Mar 29 2015