OFFSET
1,2
COMMENTS
In a counterexample to the Legendre conjecture, 2*a(n) > A350100(n) would have to hold; i.e., the primes adjacent to a square k^2 would have to have a difference > 2k+1. Therefore, a(50) would have to be larger by an order of magnitude of 10^9. - Hugo Pfoertner, Dec 27 2025
LINKS
Plot of a(n) vs log(A350100), using Plot 2.
PROG
(PARI) a378904(kmax) = my(d=0); for(k=2, kmax, my(k2=k*k, dd=(nextprime(k2)-precprime(k2))/2); if(dd>d, print1(dd, ", "); d=dd));
a378904(10^6)
(Python)
from itertools import count, islice
from sympy import prevprime, nextprime
def A378904_gen(): # generator of terms
c = 0
for k in count(2):
a = nextprime(m:=k**2)-prevprime(m)
if a>c:
yield a>>1
c = a
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Hugo Pfoertner, Dec 15 2024
EXTENSIONS
a(50) from Hugo Pfoertner, Jan 04 2025
STATUS
approved
