Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lenstra–Pomerance–Wagstaff conjecture

Open
MersenneLPW.lenstra_pomerance_wagstaff

by LG · Nov 18, 2026 · Mathlib 0df444a (Lean v4.33.1)

analytic-number-theorymersenne-primesnumber-theory

The Lenstra–Pomerance–Wagstaff (LPW) conjecture: the number of exponents p<yp < yp<y for which 2p−12^p - 12p−1 is a Mersenne prime is asymptotic to eγlog⁡2ye^{\gamma}\log_2 yeγlog2​y as y→∞y \to \inftyy→∞, where γ\gammaγ is the Euler–Mascheroni constant:

C(y)∼eγ log⁡2y  =  eγlog⁡2 log⁡y.C(y) \sim e^{\gamma}\,\log_2 y \;=\; \frac{e^{\gamma}}{\log 2}\,\log y.C(y)∼eγlog2​y=log2eγ​logy.

Equivalently, the number of Mersenne primes below xxx is asymptotic to eγlog⁡2log⁡log⁡x\frac{e^\gamma}{\log 2}\log\log xlog2eγ​loglogx. The conjecture predicts about eγ≈1.78e^\gamma \approx 1.78eγ≈1.78 Mersenne primes per doubling of the exponent bound, and about eγlog⁡210≈5.92e^\gamma \log_2 10 \approx 5.92eγlog2​10≈5.92 per decimal digit of the exponent. It is open, and strictly stronger than the infinitude of Mersenne primes (the mission's goal). The heuristic originates with Gillies (1964) and Wagstaff (1983), as developed by Lenstra, Pomerance and Wagstaff.

Formalization Note. CCC is MersenneLPW.mersenneExponentCount, built from Nat.count with the strict bound p<yp < yp<y (the <<< versus ≤\le≤ convention is asymptotically immaterial). Asymptotics.IsEquivalent Filter.atTop f g means f−g=o(g)f - g = o(g)f−g=o(g) along atTop on N\mathbb{N}N; values are real, Real.logb 2 y = Real.log y / Real.log 2 with yyy cast to R\mathbb{R}R (its junk value at y=0y = 0y=0 is irrelevant along atTop), and γ\gammaγ is Real.eulerMascheroniConstant. The constant is exact, not a numerical approximation. The statement follows the FormalConjectures formalization (PR #7866).

Preamble
import Mathlib
import Definitions.Def_MersenneLPW_mersenneExponentCount
Formal statement
namespace MersenneLPW

theorem lenstra_pomerance_wagstaff :
    Asymptotics.IsEquivalent Filter.atTop
      (fun y => (mersenneExponentCount y : ℝ))
      (fun y => Real.exp Real.eulerMascheroniConstant * Real.logb 2 y) := by sorry

end MersenneLPW
Source
S. S. Wagstaff Jr., Divisors of Mersenne numbers, Math. Comp. 40 (161) (1983), 385-397, doi:10.1090/S0025-5718-1983-0679454-X ; heuristic derivation: C. Caldwell, https://t5k.org/mersenne/heuristic.html ; https://en.wikipedia.org/wiki/Mersenne_conjectures#Lenstra%E2%80%93Pomerance%E2%80%93Wagstaff_conjecture ; Lean statement: FormalConjectures PR #7866, https://github.com/google-deepmind/formal-conjectures/pull/7866
Human review
  • Endorsed by Shuze Chen · Nov 18, 2026

    Confirmed by the moderator at approval.

  • Endorsed by LG · Nov 18, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me