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 A350100 #25 Jan 04 2025 16:10:55 %S A350100 2,3,5,11,23,30,41,50,76,100,149,159,189,345,437,509,693,1110,1165, %T A350100 5018,14908,18906,19079,28634,38682,80444,105686,185179,265236,269697, %U A350100 409049,558269,1673629,2965232,3528015,4292936,34919969,43957056,148793437,187220890,424171123 %N A350100 Numbers k such that the prime gap between the consecutive primes p1 < k^2 < p2 sets a new record. %C A350100 a(51) (in b-file) > 1.5*10^11, corresponding to A378904(51) > 723. - _Hugo Pfoertner_, Jan 04 2025 %H A350100 Hugo Pfoertner, <a href="/A350100/b350100.txt">Table of n, a(n) for n = 1..50</a> %e A350100 n a(n) p1 a(n)^2 p2 gap=2*A378904(n) %e A350100 1 2 3 4 5 2 %e A350100 2 3 7 9 11 4 %e A350100 3 5 23 25 29 6 %e A350100 4 11 113 121 127 14 %e A350100 5 23 523 529 541 18 %e A350100 6 30 887 900 907 20 %e A350100 7 41 1669 1681 1693 24 %e A350100 8 50 2477 2500 2503 26 %t A350100 Module[{nn=4242*10^5,pg},pg=Table[{n,NextPrime[n^2]-NextPrime[n^2,-1]},{n,2,nn}];DeleteDuplicates[pg,GreaterEqual[#1[[2]],#2[[2]]]&]][[All,1]] (* _Harvey P. Dale_, Jan 28 2023 *) %o A350100 (PARI) a350100(limit) = {my(pmax=0); for(k=2,limit, my(kk=k*k, pp=precprime(kk), pn=nextprime(kk), d=pn-pp); if(d>pmax, print1(k,", "); pmax=d))}; %o A350100 a350100(3000000) %o A350100 (Python) %o A350100 from itertools import count, islice %o A350100 from sympy import prevprime, nextprime %o A350100 def A350100_gen(): # generator of terms %o A350100 c = 0 %o A350100 for k in count(2): %o A350100 a = nextprime(m:=k**2)-prevprime(m) %o A350100 if a>c: %o A350100 yield k %o A350100 c = a %o A350100 A350100_list = list(islice(A350100_gen(),20)) # _Chai Wah Wu_, Dec 17 2024 %Y A350100 A378904 are the corresponding gaps, divided by 2. %Y A350100 Cf. A001223, A005250, A058043. %K A350100 nonn %O A350100 1,1 %A A350100 _Hugo Pfoertner_, Dec 25 2021