Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Wagstaff primes, special forms, the New Mersenne statement and Catalan--Mersenne numbers

Definition
FCP_Mersenne

by LG · Sep 15, 2026 · Mathlib 0df444a (Lean v4.33.1)

number-theory

Fix a natural number ppp. We say ppp gives a Wagstaff prime when ppp is odd and (2p+1)/3(2^p+1)/3(2p+1)/3 is prime, and that ppp has special form when p=2k±1p = 2^k \pm 1p=2k±1 or p=4k±3p = 4^k \pm 3p=4k±3 for some kkk.

The New Mersenne statement at ppp is the assertion that among the three conditions (2p−12^p - 12p−1 prime), ((2p+1)/3(2^p+1)/3(2p+1)/3 prime) and (ppp of special form), any two imply the third.

The Catalan--Mersenne numbers are c0=2c_0 = 2c0​=2 and cn+1=2cn−1c_{n+1} = 2^{c_n} - 1cn+1​=2cn​−1.

Definition code
import Mathlib

namespace FCP.Mersenne

/-- `GivesWagstaffPrime p` holds when `p` is odd and `(2 ^ p + 1) / 3` (natural division) is
prime; such a prime is called a Wagstaff prime. -/
def GivesWagstaffPrime (p : ℕ) : Prop := Odd p ∧ Nat.Prime ((2 ^ p + 1) / 3)

/-- `IsSpecialForm p` holds when `p = 2 ^ k + 1`, `p = 2 ^ k - 1`, `p = 4 ^ k + 3` or
`p = 4 ^ k - 3` for some `k : ℕ` (subtraction is truncated subtraction of naturals). -/
def IsSpecialForm (p : ℕ) : Prop :=
  ∃ k : ℕ, p = 2 ^ k + 1 ∨ p = 2 ^ k - 1 ∨ p = 4 ^ k + 3 ∨ p = 4 ^ k - 3

/-- The New Mersenne conjecture's assertion at `p`: among the three conditions
"`2 ^ p - 1` is prime", "`(2 ^ p + 1) / 3` is prime" and "`p` has special form",
any two imply the third. -/
def NewMersenneStatement (p : ℕ) : Prop :=
  ((mersenne p).Prime ∧ GivesWagstaffPrime p → IsSpecialForm p) ∧
  ((mersenne p).Prime ∧ IsSpecialForm p → GivesWagstaffPrime p) ∧
  (GivesWagstaffPrime p ∧ IsSpecialForm p → (mersenne p).Prime)

/-- The Catalan-Mersenne numbers `c 0 = 2`, `c (n+1) = 2 ^ c n - 1`. -/
def catalanMersenne : ℕ → ℕ
  | 0 => 2
  | n + 1 => 2 ^ catalanMersenne n - 1

end FCP.Mersenne
Source
Formal Conjectures library (Google DeepMind), Apache-2.0, https://github.com/google-deepmind/formal-conjectures (FormalConjectures/Wikipedia/Mersenne.lean); https://en.wikipedia.org/wiki/Mersenne_conjectures
Read-back

What the Lean code literally says, in plain math · Aristotle by Harmonic (non-blind: same agent that drafted the statements)

Non-blind read-back. This read-back was not written by an independent blind auditor: it was written by the same agent that drafted the Lean statement, with full knowledge of the intended meaning and of the source material. It is therefore not independent testimony and must not be mistaken for it; a reviewer who wants genuine blind testimony should commission it separately.

Four definitions about natural numbers.

  1. Gives a Wagstaff prime at ppp: ppp is odd and the natural number (2p+1)/3(2^p + 1)/3(2p+1)/3 is prime, where the division is truncating natural-number division (it discards any remainder rather than requiring 3∣2p+13 \mid 2^p + 13∣2p+1).

  2. Special form at ppp: there exists a natural number kkk with p=2k+1p = 2^k + 1p=2k+1, or p=2k−1p = 2^k - 1p=2k−1, or p=4k+3p = 4^k + 3p=4k+3, or p=4k−3p = 4^k - 3p=4k−3; the subtractions are truncated natural subtraction, so e.g. 40−3=04^0 - 3 = 040−3=0 and 20−1=02^0 - 1 = 020−1=0.

  3. New Mersenne statement at ppp: the conjunction of three implications — if 2p−12^p - 12p−1 is prime and ppp gives a Wagstaff prime then ppp has special form; if 2p−12^p - 12p−1 is prime and ppp has special form then ppp gives a Wagstaff prime; if ppp gives a Wagstaff prime and has special form then 2p−12^p - 12p−1 is prime. Here 2p−12^p - 12p−1 is the Mersenne number of ppp.

  4. Catalan--Mersenne numbers: the sequence with c0=2c_0 = 2c0​=2 and cn+1=2cn−1c_{n+1} = 2^{c_n} - 1cn+1​=2cn​−1 in truncated natural subtraction.

Human review
  • Endorsed by Shuze Chen · Sep 17, 2026

  • Endorsed by LG · Sep 17, 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