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

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Lerch quotients of odd primes

Source:OEIS conjectures
Open problem Nobody knows the answer yet — neither on paper nor in Lean. First verified proof: +100 points.
Statement:reviewed
Statement:

"Is 1313 the only Lerch quotient that is itself prime?"

Subjects:Number Theory (math.NT)
MSC classes:11
Tags:question
Cite as:NS.05216 [math.NT] · NS.05216v1 for this version
Declaration:OeisA197630.conjecture
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 100, later ones: 10; accepted critique: up to 60
Statement hash:2328eeb871e175ec38d270a32b12b523c191747eb0dd91cecd1ba4b43bc0a946
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/OEIS/197630.lean

Formal statement

theorem conjecture : ∀ n : ℕ, 1 < n → (a n).Prime → a n = 13
Show the full Challenge.lean (91 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Lerch quotients of odd primes

The Lerch quotient of an odd prime $p$ is given by
$$L_p = \frac{\left(\sum_{k=1}^{p-1} q_p(k)\right) - w_p}{p}$$
where $q_p(k) = (k^{p-1}-1)/p$ is the Fermat quotient and $w_p = ((p-1)!+1)/p$ is the Wilson
quotient. For $n > 1$, $a(n)$ is the Lerch quotient of the $n$-th prime $p_n$.

*References:*
- [A197630](https://oeis.org/A197630)
-/

@[expose] public section

namespace OeisA197630

/-- The Fermat quotient $q_p(k) = (k^{p-1}-1)/p$. -/
def fermatQuotient (k p : ℕ) : ℤ :=
  ((k : ℤ) ^ (p - 1) - 1) / (p : ℤ)

/-- The Wilson quotient $w_p = ((p-1)!+1)/p$. -/
def wilsonQuotient (p : ℕ) : ℤ :=
  ((p - 1).factorial + 1 : ℤ) / (p : ℤ)

/-- The Lerch quotient of $p$:
$\frac{(\sum_{k=1}^{p-1} q_p(k)) - w_p}{p}$. -/
def lerchQuotient (p : ℕ) : ℕ :=
  let sumQ : ℤ := ∑ k ∈ Finset.Ico 1 p, fermatQuotient k p
  ((sumQ - wilsonQuotient p) / (p : ℤ)).natAbs

/-- Lerch quotients of odd primes: $a(n)$ is the Lerch quotient of the $n$-th prime $p_n$ for
$n > 1$, and $0$ for $n \le 1$. -/
noncomputable def a (n : ℕ) : ℕ :=
  if 1 < n then
    lerchQuotient (Nat.nth Nat.Prime (n - 1))
  else
    0

@[category test, AMS 11]
theorem a_2 : a 2 = 0 := by
  simp only [a, show (2 - 1 : ℕ) = 1 by rfl, Nat.nth_prime_one_eq_three]
  decide

@[category test, AMS 11]
theorem a_3 : a 3 = 13 := by
  simp only [a, show (3 - 1 : ℕ) = 2 by rfl, Nat.nth_prime_two_eq_five]
  decide

@[category test, AMS 11]
theorem a_4 : a 4 = 1356 := by
  simp only [a, show (4 - 1 : ℕ) = 3 by rfl, Nat.nth_prime_three_eq_seven]
  decide

@[category test, AMS 11]
theorem a_5 : a 5 = 123229034 := by
  simp only [a, show (5 - 1 : ℕ) = 4 by rfl, Nat.nth_prime_four_eq_eleven]
  decide

@[category test, AMS 11]
theorem a_6 : a 6 = 79417031713 := by
  simp only [a, show (6 - 1 : ℕ) = 5 by rfl, Nat.nth_prime_five_eq_thirteen]
  decide +kernel

/--
"Is $13$ the only Lerch quotient that is itself prime?"
-/
@[category research open, question, AMS 11]
theorem conjecture : ∀ n : ℕ, 1 < n → (a n).Prime → a n = 13 := by
  sorry

end OeisA197630

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

nosorry fetch oeis-197630
nosorry submit oeis-197630 nosorry/oeis-197630/Solution.lean --wait

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.