login
2*a(n) are the gaps that correspond to A350100(n).
4

%I #21 Jan 25 2026 17:28:01

%S 1,2,3,7,9,10,12,13,15,17,18,20,26,27,29,33,39,41,66,75,84,90,95,100,

%T 113,126,140,144,155,162,177,204,206,210,216,302,303,364,389,391,399,

%U 418,441,469,492,497,504,520,613,723

%N 2*a(n) are the gaps that correspond to A350100(n).

%C 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

%H <a href="/plot2a?name1=A350100&amp;name2=A378904&amp;tform1=log+base+10&amp;tform2=untransformed&amp;shift=0&amp;radiop1=xy&amp;drawpoints=true">Plot of a(n) vs log(A350100)</a>, using Plot 2.

%o (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));

%o a378904(10^6)

%o (Python)

%o from itertools import count, islice

%o from sympy import prevprime, nextprime

%o def A378904_gen(): # generator of terms

%o c = 0

%o for k in count(2):

%o a = nextprime(m:=k**2)-prevprime(m)

%o if a>c:

%o yield a>>1

%o c = a

%o A378904_list = list(islice(A378904_gen(),20)) # _Chai Wah Wu_, Dec 17 2024

%Y Cf. A058043, A350100.

%K nonn,more

%O 1,2

%A _Hugo Pfoertner_, Dec 15 2024

%E a(50) from _Hugo Pfoertner_, Jan 04 2025