login
A378904
2*a(n) are the gaps that correspond to A350100(n).
4
1, 2, 3, 7, 9, 10, 12, 13, 15, 17, 18, 20, 26, 27, 29, 33, 39, 41, 66, 75, 84, 90, 95, 100, 113, 126, 140, 144, 155, 162, 177, 204, 206, 210, 216, 302, 303, 364, 389, 391, 399, 418, 441, 469, 492, 497, 504, 520, 613, 723
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
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
A378904_list = list(islice(A378904_gen(), 20)) # Chai Wah Wu, Dec 17 2024
CROSSREFS
Sequence in context: A140221 A046668 A047533 * A060525 A152863 A047359
KEYWORD
nonn,more
AUTHOR
Hugo Pfoertner, Dec 15 2024
EXTENSIONS
a(50) from Hugo Pfoertner, Jan 04 2025
STATUS
approved