login
A350100
Numbers k such that the prime gap between the consecutive primes p1 < k^2 < p2 sets a new record.
1
2, 3, 5, 11, 23, 30, 41, 50, 76, 100, 149, 159, 189, 345, 437, 509, 693, 1110, 1165, 5018, 14908, 18906, 19079, 28634, 38682, 80444, 105686, 185179, 265236, 269697, 409049, 558269, 1673629, 2965232, 3528015, 4292936, 34919969, 43957056, 148793437, 187220890, 424171123
OFFSET
1,1
EXAMPLE
n a(n) p1 a(n)^2 p2 gap
1 2 3 4 5 2
2 3 7 9 11 4
3 5 23 25 29 6
4 11 113 121 127 14
5 23 523 529 541 18
6 30 887 900 907 20
7 41 1669 1681 1693 24
8 50 2477 2500 2503 26
MATHEMATICA
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 *)
PROG
(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))};
a350100(3000000)
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Dec 25 2021
STATUS
approved