Skip to content
DARC
■ Change #153 · wiki.edited

Legendre's conjecture: a prime between every two consecutive squares: Normalize Markdown to canonical form

by DARC wiki2026-10-22 20:31:18 UTCOpen the page →
stateOfArt
− **Known gap bounds are too weak.** Baker, Harman and Pintz (2001) proved a prime exists in $[x - x^{21/40}, x]$ for all large $x$, so gaps of size $p^{0.525}$; Legendre needs gaps below about $2\sqrt{p}$, i.e. exponent $1/2$. **Under the Riemann Hypothesis** Cramér showed gaps are $O(\sqrt{p}\log p)$, still a logarithm short. Cramér's heuristic gap size $(\log p)^2$ would give Legendre for large $n$. **Numerics:** a table of maximal prime gaps confirms the conjecture up to $n^2 = 2\cdot 10^{19}$. **Unrefereed claim:** a 2023 arXiv preprint by Luan Alberto Ferreira (revised May 2026, submitted to *Annals of Mathematics*, not published) claims that every interval $(x, x+x^\lambda]$ with $0<\lambda<1$ contains asymptotically $x^\lambda/\log x$ primes, which would give Legendre for all sufficiently large $n$ (the Formal Conjectures file labels the large-$n$ statement as solved, citing Ferreira). It has not been confirmed by independent review; since the Riemann Hypothesis gives such asymptotics only for $\lambda > 1/2$, the claim goes beyond RH and needs especially careful checking. Even if correct, it would not settle small $n$ beyond the numerical range.
+ **Known gap bounds are too weak.** Baker, Harman and Pintz (2001) proved a prime exists in $[x - x^{21/40}, x]$ for all large $x$, so gaps of size $p^{0.525}$; Legendre needs gaps below about $2\sqrt{p}$, i.e. exponent $1/2$. **Under the Riemann Hypothesis** Cramér showed gaps are $O(\sqrt{p}\log p)$, still a logarithm short. Cramér's heuristic gap size $(\log p)^2$ would give Legendre for large $n$. **Numerics:** a table of maximal prime gaps confirms the conjecture up to $n^2 = 2\cdot 10^{19}$. **Unrefereed claim:** a 2023 arXiv preprint by Luan Alberto Ferreira (revised May 2026, submitted to _Annals of Mathematics_, not published) claims that every interval $(x, x+x^\lambda]$ with $0<\lambda<1$ contains asymptotically $x^\lambda/\log x$ primes, which would give Legendre for all sufficiently large $n$ (the Formal Conjectures file labels the large-$n$ statement as solved, citing Ferreira). It has not been confirmed by independent review; since the Riemann Hypothesis gives such asymptotics only for $\lambda > 1/2$, the claim goes beyond RH and needs especially careful checking. Even if correct, it would not settle small $n$ beyond the numerical range.
explainer.student
**The question.** Between $1$ and $4$ lie the primes $2$ and $3$; between $4$ and $9$ lie $5$ and $7$; between $9$ and $16$ lie $11$ and $13$. Legendre asked whether there is always at least one prime between consecutive squares $n^2$ and $(n+1)^2$. In Lean: `∀ n ≥ 1, ∃ p ∈ Set.Ioo (n ^ 2) ((n + 1) ^ 2), Nat.Prime p`, where `Set.Ioo a b` is the open interval $(a,b)$.
− **A question about gaps.** The interval $(n^2,(n+1)^2)$ has length $2n+1$, about $2\sqrt x$ for numbers $x$ near $n^2$. So the conjecture says, roughly, that the *prime gap* after a prime $p$ (the distance to the next prime) never exceeds about $2\sqrt p$.
+ **A question about gaps.** The interval $(n^2,(n+1)^2)$ has length $2n+1$, about $2\sqrt x$ for numbers $x$ near $n^2$. So the conjecture says, roughly, that the _prime gap_ after a prime $p$ (the distance to the next prime) never exceeds about $2\sqrt p$.
**How big are prime gaps?** The prime number theorem says primes near $x$ are spaced $\ln x$ apart on average, which is tiny compared with $\sqrt x$: near $10^{18}$, $\ln x\approx 41$ while $\sqrt x=10^9$. The largest gaps found by computer are only about $(\ln p)^2$. So the conjecture looks safe numerically, and it has been checked for all $n^2$ up to $2\cdot10^{19}$.
− **Why it is not proved.** A bound on *every* gap is much harder than a statement about the average. The best unconditional result (Baker, Harman and Pintz, 2001) finds a prime in every interval $[x-x^{0.525},x]$ for large $x$, so gaps are below $p^{0.525}$; Legendre needs the exponent $0.5$. Even the Riemann Hypothesis, the most famous open problem about primes, only gives gaps below a constant times $\sqrt p\,\ln p$, too weak by a factor of $\ln p$. The methods work through the zeros of the Riemann zeta function: few zeros away from the critical line means primes are evenly spread over short intervals, and current estimates stop at the exponent $0.525$.
+ **Why it is not proved.** A bound on _every_ gap is much harder than a statement about the average. The best unconditional result (Baker, Harman and Pintz, 2001) finds a prime in every interval $[x-x^{0.525},x]$ for large $x$, so gaps are below $p^{0.525}$; Legendre needs the exponent $0.5$. Even the Riemann Hypothesis, the most famous open problem about primes, only gives gaps below a constant times $\sqrt p\,\ln p$, too weak by a factor of $\ln p$. The methods work through the zeros of the Riemann zeta function: few zeros away from the critical line means primes are evenly spread over short intervals, and current estimates stop at the exponent $0.525$.
**A claim to watch.** A 2023 preprint by Ferreira (revised May 2026, not peer reviewed) claims that every interval $(x,x+x^\lambda]$ with fixed $\lambda>0$ contains the expected number of primes for large $x$. That would give Legendre for all large $n$, and it goes beyond what even the Riemann Hypothesis gives, so it needs very careful checking.
**How a solution is checked.** A Lean proof of the declaration above, compared with the corpus statement by a checking tool. A proof for large $n$ only is partial progress; the remaining small $n$ could then be closed by a certified computation.
hash 47d69a03a5c2bf02ae044ba85d2de96683e5e0ca8c85e00842dd8565843f52b2
previous a0c457cc9cf34615116d54b393c98331e466f03ab130aa9cbdd8fd917361e79b