Legendre's conjecture: a prime between every two consecutive squares
Difficulty 84: one of Landau's four problems, and harder than it looks because even the Riemann Hypothesis (96) gives gaps of only √p·log p, a log factor short; the best unconditional exponent is 0.525 against the 0.5 needed. It sits just below the twin prime conjecture (87 in the calibration pass) and abc (85), and above the conditional parity-barrier gap problem (80), which at least has a precise sieve target. The unrefereed Ferreira claim does not move the grade. Application value 3.5: none beyond methods for primes in short intervals. Leverage 24: Andrica- and Brocard-type statements follow, little else.
The problem
Is there always a prime number between two consecutive perfect squares?
- 1Squares spread out; primes thin out
- 2Gaps must stay below about sqrt(p)
- 3Best proof only reaches p^0.525
- 4Even RH falls a logarithm short
The question. Between and lie the primes and ; between and lie and ; between and lie and . Legendre asked whether there is always at least one prime between consecutive squares and . In Lean: , where is the open interval .
Path to understanding
foundations → problemThe research entries this problem rests on, in the order to read them. Each links to its explainer.
- Start with
- Step 2
- Harmonic analysisTheory
- Step 3
- Then
- Legendre's conjecture: a prime between every two consecutive squaresThe problem
State of the art
Known gap bounds are too weak. Baker, Harman and Pintz (2001) proved a prime exists in for all large , so gaps of size ; Legendre needs gaps below about , i.e. exponent . Cramér showed gaps are , still a logarithm short. Cramér's heuristic gap size would give Legendre for large . a table of maximal prime gaps confirms the conjecture up to . a 2023 arXiv preprint by Luan Alberto Ferreira (revised May 2026, submitted to , not published) claims that every interval with contains asymptotically primes, which would give Legendre for all sufficiently large (the Formal Conjectures file labels the large- statement as solved, citing Ferreira). It has not been confirmed by independent review; since the Riemann Hypothesis gives such asymptotics only for , the claim goes beyond RH and needs especially careful checking. Even if correct, it would not settle small beyond the numerical range.
Realistic applications
None directly; primes in short intervals matter for the analysis of algorithms that search for primes, but nothing deployed depends on the exponent. The methods (zero-density estimates and exponential sums) are reused elsewhere in analytic number theory.
What counts as solved
A Lean proof of legendre_conjecture as stated. A proof of the eventual version alone (for all sufficiently large ) is a genuine partial result and would be recorded as PARTIAL, with the finite range closed by computation checked in Lean.
How it gets verified
Lean proofA formal proof checked by Lean 4 / Mathlib.
Statement: LegendreConjecture.legendre_conjecture in formal-conjectures: ∀ n ≥ 1, ∃ p ∈ Set.Ioo (n ^ 2) ((n + 1) ^ 2), Nat.Prime p. All ingredients are in Mathlib (Nat.Prime, Set.Ioo). The same file (pinned at commit e754a78, 17 October 2026) states the eventual version legendre_conjecture.ferreira_large_n (∀ᶠ n in atTop, ..., labelled solved on the strength of Ferreira's unrefereed preprint) and a conditional implication bounded_gap_legendre with a linked Lean proof by AlphaProof, which are useful stepping stones; Mathlib itself has Bertrand's postulate (NumberTheory.Bertrand) but nothing near squares. Accept a proof only if it compiles against the corpus' pinned Mathlib and a statement-fixing judge confirms the declaration is unchanged.
Claims under verification
+ add a claimWhere the work is
Progress requires stronger zero-density or exponential-sum estimates; computation is limited to checking prime gaps.
Bottlenecks
ranked by votes- #1TheoryGap exponent stuck at 0.525
Unconditional results reach gaps of p^0.525 (Baker–Harman–Pintz); Legendre needs below 0.5 with an explicit constant, and even RH only gives sqrt(p) log p.
Community grades
Sign in to add your own grade.