OpenFrontiers
← Back to the index
OP-10070Status unassessedNumber theory

Wieferich primes

Wieferich primes

Inferred from the community field; finer classification has not been reviewed.

Specialist source · status unassessedAs of 2026-09-10Source & evidence ↓

Problem statement

infinite_isWieferichPrime

There are infinitely many Wieferich primes.

isWieferichPrime_iff

Are 10931093 and 35113511 the only Wieferich primes? They are the only known ones: PrimeGrid's search, completed in 2022, shows that any other Wieferich prime exceeds 2642^{64}. On the other hand, the heuristic count of log⁡log⁡x\log \log x Wieferich primes up to xx predicts that there are infinitely many, see infinite_isWieferichPrime.

infinite_isWieferichPrimeBase

For any given integer a>0a > 0, are there infinitely many primes pp such that ap−1≡1(modp2)a^{p-1} \equiv 1 \pmod{p^2}? The case a=1a = 1 is trivial, since every prime qualifies (isWieferichPrimeBase_one_iff). So is the case a=0a = 0 under our definition (isWieferichPrimeBase_zero_iff), which is why the source's restriction to a>0a > 0 is dropped.

exists_isWieferichPrimeBase_47

Are there any Wieferich primes to base 4747? None is currently known.

Lean 4

No Lean submitted

Formal statement

Lean 4
/-
Copyright 2026 The Formal Conjectures Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/

import FormalConjecturesUtil

/-!
# Wieferich primes

A Wieferich prime is a prime $p$ with $2^{p-1} \equiv 1 \pmod{p^2}$. The only known examples are
$1093$ and $3511$. It is conjectured that there are infinitely many Wieferich primes; a heuristic
argument suggests that the number of Wieferich primes up to $x$ grows like $\log \log x$.

More generally, a prime $p$ is a Wieferich prime to base $a$ if $a^{p-1} \equiv 1 \pmod{p^2}$.
Wikipedia's list of unsolved problems also asks whether there are infinitely many Wieferich primes
to every base $a > 0$, and whether there is any Wieferich prime to base $47$. It is also not known
whether there is any Wieferich prime besides $1093$ and $3511$.

*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)
* [OEIS A001220](https://oeis.org/A001220)
* P. Ribenboim, *Die Welt der Primzahlen*, 2nd ed., Springer (2006), pp. 242–243.
* [PrimeGrid, Wieferich and Wall–Sun–Sun Prime Search](https://www.primegrid.com/stats_ww.php)
-/

namespace WieferichPrime

/-- There are infinitely many Wieferich primes. -/
@[category research open, AMS 11]
theorem infinite_isWieferichPrime : {p : ℕ | IsWieferichPrime p}.Infinite := by
  sorry

/--
Are $1093$ and $3511$ the only Wieferich primes? They are the only known ones: PrimeGrid's search,
completed in 2022, shows that any other Wieferich prime exceeds $2^{64}$. On the other hand, the
heuristic count of $\log \log x$ Wieferich primes up to $x$ predicts that there are infinitely
many, see `infinite_isWieferichPrime`.
-/
@[category research open, AMS 11]
theorem isWieferichPrime_iff :
    answer(sorry) ↔ ∀ p, IsWieferichPrime p ↔ p = 1093 ∨ p = 3511 := by
  sorry

/--
For any given integer $a > 0$, are there infinitely many primes $p$ such that
$a^{p-1} \equiv 1 \pmod{p^2}$? The case $a = 1$ is trivial, since every prime qualifies
(`isWieferichPrimeBase_one_iff`). So is the case $a = 0$ under our definition
(`isWieferichPrimeBase_zero_iff`), which is why the source's restriction to $a > 0$ is dropped.
-/
@[category research open, AMS 11]
theorem infinite_isWieferichPrimeBase :
    answer(sorry) ↔ ∀ a : ℕ, {p : ℕ | IsWieferichPrimeBase a p}.Infinite := by
  sorry

/-- Are there any Wieferich primes to base $47$? None is currently known. -/
@[category research open, AMS 11]
theorem exists_isWieferichPrimeBase_47 : answer(sorry) ↔ ∃ p, IsWieferichPrimeBase 47 p := by
  sorry

/-- The prime $1093$ is a Wieferich prime: $2^{1092} \equiv 1 \pmod{1093^2}$. -/
@[category test, AMS 11]
theorem isWieferichPrime_1093 : IsWieferichPrime 1093 := by
  decide +kernel

/-- The prime $3511$ is a Wieferich prime: $2^{3510} \equiv 1 \pmod{3511^2}$. -/
@[category test, AMS 11]
theorem isWieferichPrime_3511 : IsWieferichPrime 3511 :=
  ⟨by norm_num, by decide +kernel⟩

/-- The prime $2$ is not a Wieferich prime, so no hypothesis excluding it is needed. -/
@[category test, AMS 11]
theorem not_isWieferichPrime_two : ¬ IsWieferichPrime 2 := by
  decide

end WieferichPrime

On-site verification needs an executable Lean target. None is attached yet.

A source attachment or link is not a verified proof. The statement’s correspondence with the original question needs human review.

Proofs & verification

No Lean has been submitted for this problem yet. A Lean file can be attached to a submission for review, though with no target here it cannot be machine-checked.

Background

Source snapshot inspected on 10 September 2026. Subsequent research status and the accuracy of source formalizations have not been independently certified.

Fixed commit b82b08faa9006484021c12005ab41287fb2ffb69. This file contains 4 source-labeled research-open declarations. Other declarations in the attached file can be definitions, solved results or tests. The file is preserved as source material; it has not been compiled or proved by this import.

Copyright The Formal Conjectures Authors. Code: Apache-2.0; other original material: CC BY 4.0. Third-party sources retain their own licenses. Original source files and notices preserved.

References
  1. [1]Formal Conjectures — Wieferich primes link
  2. [2]Original reference cited in the formalization link
  3. [3]Original reference cited in the formalization link
  4. [4]Original reference cited in the formalization link
  5. [5]Original reference cited in the formalization link

Recorded progress

Add yours →

Nothing recorded yet. A pointer to a paper the entry is missing counts.

Machine attempts

0 recorded

Attempts run against the statement below and are recorded in full, including the failures. The point is to stop the next model — and the next person — from re-walking a road that is already known to end. Each attempt costs 25 credits.

No machine attempts recorded.

Sign in to run an attempt. New accounts start with enough credits for ten.

Discussion

0 notes

Notes are for clarifying the statement, flagging a missing reference, or recording why an approach fails. Claimed solutions belong in a submission, where they can be reviewed.

No notes yet.

Sign in to add a note.