{
  "id": "5216",
  "ident": "NS.05216",
  "slug": "oeis-197630",
  "title": "Lerch quotients of odd primes",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "\"Is $13$ the only Lerch quotient that is itself prime?\"",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question"
  ],
  "collection": "oeis",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "OeisA197630.conjecture",
  "statement_lean": "theorem conjecture : ∀ n : ℕ, 1 < n → (a n).Prime → a n = 13",
  "challenge_source": "/-\nCopyright 2026 The Formal Conjectures Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-/\nmodule\n\npublic import FormalConjecturesUtil\n\n/-!\n# Lerch quotients of odd primes\n\nThe Lerch quotient of an odd prime $p$ is given by\n$$L_p = \\frac{\\left(\\sum_{k=1}^{p-1} q_p(k)\\right) - w_p}{p}$$\nwhere $q_p(k) = (k^{p-1}-1)/p$ is the Fermat quotient and $w_p = ((p-1)!+1)/p$ is the Wilson\nquotient. For $n > 1$, $a(n)$ is the Lerch quotient of the $n$-th prime $p_n$.\n\n*References:*\n- [A197630](https://oeis.org/A197630)\n-/\n\n@[expose] public section\n\nnamespace OeisA197630\n\n/-- The Fermat quotient $q_p(k) = (k^{p-1}-1)/p$. -/\ndef fermatQuotient (k p : ℕ) : ℤ :=\n  ((k : ℤ) ^ (p - 1) - 1) / (p : ℤ)\n\n/-- The Wilson quotient $w_p = ((p-1)!+1)/p$. -/\ndef wilsonQuotient (p : ℕ) : ℤ :=\n  ((p - 1).factorial + 1 : ℤ) / (p : ℤ)\n\n/-- The Lerch quotient of $p$:\n$\\frac{(\\sum_{k=1}^{p-1} q_p(k)) - w_p}{p}$. -/\ndef lerchQuotient (p : ℕ) : ℕ :=\n  let sumQ : ℤ := ∑ k ∈ Finset.Ico 1 p, fermatQuotient k p\n  ((sumQ - wilsonQuotient p) / (p : ℤ)).natAbs\n\n/-- Lerch quotients of odd primes: $a(n)$ is the Lerch quotient of the $n$-th prime $p_n$ for\n$n > 1$, and $0$ for $n \\le 1$. -/\nnoncomputable def a (n : ℕ) : ℕ :=\n  if 1 < n then\n    lerchQuotient (Nat.nth Nat.Prime (n - 1))\n  else\n    0\n\n@[category test, AMS 11]\ntheorem a_2 : a 2 = 0 := by\n  simp only [a, show (2 - 1 : ℕ) = 1 by rfl, Nat.nth_prime_one_eq_three]\n  decide\n\n@[category test, AMS 11]\ntheorem a_3 : a 3 = 13 := by\n  simp only [a, show (3 - 1 : ℕ) = 2 by rfl, Nat.nth_prime_two_eq_five]\n  decide\n\n@[category test, AMS 11]\ntheorem a_4 : a 4 = 1356 := by\n  simp only [a, show (4 - 1 : ℕ) = 3 by rfl, Nat.nth_prime_three_eq_seven]\n  decide\n\n@[category test, AMS 11]\ntheorem a_5 : a 5 = 123229034 := by\n  simp only [a, show (5 - 1 : ℕ) = 4 by rfl, Nat.nth_prime_four_eq_eleven]\n  decide\n\n@[category test, AMS 11]\ntheorem a_6 : a 6 = 79417031713 := by\n  simp only [a, show (6 - 1 : ℕ) = 5 by rfl, Nat.nth_prime_five_eq_thirteen]\n  decide +kernel\n\n/--\n\"Is $13$ the only Lerch quotient that is itself prime?\"\n-/\n@[category research open, question, AMS 11]\ntheorem conjecture : ∀ n : ℕ, 1 < n → (a n).Prime → a n = 13 := by\n  sorry\n\nend OeisA197630\n",
  "statement_hash": "2328eeb871e175ec38d270a32b12b523c191747eb0dd91cecd1ba4b43bc0a946",
  "toolchain": "leanprover/lean4:v4.33.1",
  "upstream_commit": "f9b3868d5ca994a7bf95039bcec05338c0c21e2f",
  "workspace": "formal-conjectures",
  "field": "math",
  "formalization": "formal",
  "verification": "lean-kernel",
  "license": "Apache-2.0",
  "attribution": "google-deepmind/formal-conjectures contributors",
  "metric_name": null,
  "metric_direction": null,
  "critiques": [],
  "public_partial_proofs": [],
  "research_threads": [],
  "instructions": "Read research_threads first: other people's public repositories and what they already tried. Write Solution.lean starting from challenge_source. Keep every definition identical, prove decl_name with exactly the same type, no sorry in its dependency closure, no new axioms, no native_decide, no metaprogramming. Submit with POST /api/v1/submissions."
}