cp's OEIS Frontend

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.

A090116 a(n)=x is the least number such that x^2 is "surrounded" by two closest primes, prevprime(x^2) and nextprime(x^2), whose difference nextprime - prevprime = 2n.

This page as a plain text file.
%I A090116 #18 Jun 23 2025 10:24:34
%S A090116 2,3,5,19,12,25,11,44,23,30,57,41,50,102,76,104,100,149,175,159,348,
%T A090116 276,305,397,461,189,345,1059,437,820,833,1002,509,1283,822,1099,729,
%U A090116 1090,693,2710,1110,1284,3563,1823,1370,4332,3771,1380,4394,2160,2011,1498
%N A090116 a(n)=x is the least number such that x^2 is "surrounded" by two closest primes, prevprime(x^2) and nextprime(x^2), whose difference nextprime - prevprime = 2n.
%C A090116 a(14) > 16*10^6. - _David A. Corneth_, Jun 12 2017
%H A090116 David A. Corneth, <a href="/A090116/b090116.txt">Table of n, a(n) for n = 1..213</a>
%H A090116 David A. Corneth, <a href="/A090116/a090116.gp.txt">Table of n, a(n) for n = 1..302 where a(n) <= (about) 16*10^6</a>
%e A090116 n=5: a(5)=12 because the primes closest to 12^2 = 144 are {139,149} whose difference 149 - 139 = 10 = 2n and 144 is the smallest square with this property;
%e A090116 n=1: a(1)=2 because 2^2=4 is surrounded by primes {3,5} with difference 5 - 3 = 2 = 2n.
%t A090116 de[x_] := Prime[PrimePi[x]+1]-Prime[PrimePi[x]]; de[1] = 0; t=Table[de[w^2], {w, 1, 50000}]; mt=Table[Min[Flatten[Position[t, 2*j]]], {j, 1, 100}]
%o A090116 (PARI) first(n) = my(todo = n, res = vector(n), p, x = 2); while(todo > 0, m = nextprime(x^2) - precprime(x^2); if(m <= 2*n, if(res[m/2]==0, res[m/2] = x; todo--)); x++); res \\ _David A. Corneth_, Jun 12 2017
%Y A090116 Cf. A090117, A090118, A090119.
%K A090116 nonn
%O A090116 1,1
%A A090116 _Labos Elemer_, Jan 09 2004