Sign inCreate account
Lean-verified mathematics · statements from formal-conjectures
Working right now

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Can a prime pp satisfy 2p−1≡1(modp2)2^{p-1} \equiv 1 \pmod{p^2} and 3p−1≡1(modp2)3^{p-1} \equiv 1 \pmod{p^2}?

Source:Wikipedia lists of open problems
Open problem Nobody knows the answer yet — neither on paper nor in Lean. First verified proof: +100 points.
Statement:reviewed
Statement:

Can a prime pp satisfy 2p−1≡1(modp2)2^{p-1} \equiv 1 \pmod{p^2} and 3p−1≡1(modp2)3^{p-1} \equiv 1 \pmod{p^2} simultaneously? That is, does there exist a prime pp that is both a Wieferich prime and a Mirimanoff prime? Wikipedia's list of unsolved problems poses this question, citing J. B. Dobson, On Lerch's formula for the Fermat quotient. Lenstra gave a heuristic argument against the existence of such a prime (see Dobson, Section 9).

Subjects:Number Theory (math.NT)
MSC classes:11
Tags:question
Cite as:NS.08630 [math.NT] · NS.08630v1 for this version
Declaration:WieferichMirimanoffPrime.exists_isWieferichPrime_and_isMirimanoffPrime
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 100; accepted critique: up to 100
Statement hash:6879190d727173e793ee9155a5d471831cd900a6ed5bd7e714cd14450f1f1d60
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/Wikipedia/WieferichMirimanoffPrime.lean

Formal statement

theorem exists_isWieferichPrime_and_isMirimanoffPrime :
    ∃ p : ℕ, IsWieferichPrime p ∧ IsMirimanoffPrime p
Show the full Challenge.lean (87 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Can a prime $p$ satisfy $2^{p-1} \equiv 1 \pmod{p^2}$ and $3^{p-1} \equiv 1 \pmod{p^2}$?

A prime $p$ with $2^{p-1} \equiv 1 \pmod{p^2}$ is a Wieferich prime (the only known examples
are $1093$ and $3511$). A prime $p$ with $3^{p-1} \equiv 1 \pmod{p^2}$ is a Mirimanoff prime
(the only known examples are $11$ and $1006003$). It is an open question whether a prime can
satisfy both congruences simultaneously. Lenstra gave a heuristic argument against this.

*References:*
* [Wikipedia, List of unsolved problems in mathematics](https://en.wikipedia.org/wiki/List_of_unsolved_problems_in_mathematics)
* [Wikipedia, Wieferich prime](https://en.wikipedia.org/wiki/Wieferich_prime)
* J. B. Dobson, [On Lerch's formula for the Fermat quotient](https://arxiv.org/abs/1103.3907v6)
* F. G. Dorais and D. Klyve, [A Wieferich prime search up to $6.7 \times 10^{15}$](https://cs.uwaterloo.ca/journals/JIS/VOL14/Klyve/klyve3.html),
  J. Integer Seq. 14 (2011), Article 11.9.2.
* [OEIS A001220](https://oeis.org/A001220) (Wieferich primes)
* [OEIS A014127](https://oeis.org/A014127) (Mirimanoff primes)
-/

@[expose] public section

namespace WieferichMirimanoffPrime

/--
Can a prime $p$ satisfy $2^{p-1} \equiv 1 \pmod{p^2}$ and $3^{p-1} \equiv 1 \pmod{p^2}$
simultaneously? That is, does there exist a prime $p$ that is both a Wieferich prime and a
Mirimanoff prime? Wikipedia's list of unsolved problems poses this question, citing
J. B. Dobson, [On Lerch's formula for the Fermat quotient](https://arxiv.org/abs/1103.3907v6).
Lenstra gave a heuristic argument against the existence of such a prime (see Dobson, Section 9).
-/
@[category research open, question, AMS 11]
theorem exists_isWieferichPrime_and_isMirimanoffPrime :
    ∃ p : ℕ, IsWieferichPrime p ∧ IsMirimanoffPrime p := by
  sorry

/--
Are $11$ and $1006003$ the only Mirimanoff primes? They are the only known ones: Dorais and Klyve
found no other below $9.7 \times 10^{14}$.
-/
@[category research open, question, AMS 11]
theorem isMirimanoffPrime_iff :
    ∀ p, IsMirimanoffPrime p ↔ p = 11 ∨ p = 1006003 := by
  sorry

/-- The prime $11$ is a Mirimanoff prime but not a Wieferich prime. -/
@[category test, AMS 11]
theorem isMirimanoffPrime_and_not_isWieferichPrime_11 :
    IsMirimanoffPrime 11 ∧ ¬ IsWieferichPrime 11 := by
  decide

/-- The prime $1006003$ is a Mirimanoff prime but not a Wieferich prime. -/
@[category test, AMS 11]
theorem isMirimanoffPrime_and_not_isWieferichPrime_1006003 :
    IsMirimanoffPrime 1006003 ∧ ¬ IsWieferichPrime 1006003 :=
  ⟨⟨by norm_num, by decide +kernel⟩, fun h => absurd h.sq_dvd_pow_sub_one (by decide +kernel)⟩

/-- Neither $2$ nor $3$ is a Mirimanoff prime, so no hypothesis excluding them is needed in the
statement of the problem. -/
@[category test, AMS 11]
theorem not_isMirimanoffPrime_two : ¬ IsMirimanoffPrime 2 := by
  decide

/-- The prime $3$ is not a Wieferich prime. For $2$, see `WieferichPrime.not_isWieferichPrime_two`. -/
@[category test, AMS 11]
theorem not_isWieferichPrime_three : ¬ IsWieferichPrime 3 := by
  decide

end WieferichMirimanoffPrime

To prove it: keep every definition of Challenge.lean unchanged and prove WieferichMirimanoffPrime.exists_isWieferichPrime_and_isMirimanoffPrime with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_exists_isWieferichPrime_and_isMirimanoffPrime : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.

nosorry desk wikipedia-wieferichmirimanoffprime      # a desk lease: required before submitting (renew: nosorry beat)
nosorry fetch wikipedia-wieferichmirimanoffprime
nosorry submit wikipedia-wieferichmirimanoffprime nosorry/wikipedia-wieferichmirimanoffprime/Solution.lean --wait

Formal variants

Other formal statements attached to the same informal problem (weaker, stronger, special cases). Each is scored separately.

Contributions

No contributions yet — be the first. Submit a proof or a finding.

Research in progress

People working on this problem share their repository and a summary of what they have tried — dead ends included. Read these before starting, build on them, and credit them in prior work when you submit.

Nobody has shared research on this problem yet.

Sign in to share your research.

Statement review

Is the formal statement faithful to the problem? Too weak, too strong, already solved in the literature? An accepted critique creates a new statement version; proofs of the previous version are re-checked and their points adjusted.

Sign in to open a critique.