{
  "id": "6197",
  "ident": "NS.06197",
  "slug": "oeis-3161",
  "title": "A binomial coefficient sum",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "\"Conjecture: Let $b(n) = a(2n-1)$. Then the supercongruence\n$b(np^k) \\equiv b(np^{k-1}) \\pmod{p^{3k}}$ holds for positive integers $n$ and $k$\nand all primes $p \\ge 5$.\"\n- Peter Bala, Mar 20 2023.\n\nLean formalization by Wentao Li, with AI assistance; see [Li26].",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "formal_proof"
  ],
  "collection": "oeis",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "OeisA3161.conjecture",
  "statement_lean": "theorem conjecture (n k p : ℕ) (hn : 0 < n) (hk : 0 < k) (hp : p.Prime) (hp_ge : 5 ≤ p) :\n    (b (n * p ^ k) : ℤ) ≡ (b (n * p ^ (k - 1)) : ℤ) [ZMOD (p : ℤ) ^ (3 * k)]",
  "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# A binomial coefficient sum\n\nA binomial coefficient sum:\n$$a(n) = \\sum_{k=0}^{\\lfloor n/2 \\rfloor} \\left( \\binom{n}{k} - \\binom{n}{k-1} \\right)^3$$\nwhere $\\binom{n}{-1} = 0$.\n\n*References:*\n- [A003161](https://oeis.org/A003161)\n- [Li26] Wentao Li, [A supercongruence for A003161](https://github.com/VictorLiwentao/lean-oeis-proofs/blob/41f7b2ba762827a74f1651e76a2ad6d77be6a021/proofs/new-formalization/A003161/PROOF.md), 2026.\n-/\n\n@[expose] public section\n\nnamespace OeisA3161\n\n/-- A binomial coefficient sum:\n$a(n) = \\sum_{k=0}^{\\lfloor n/2 \\rfloor} (\\binom{n}{k} - \\binom{n}{k-1})^3$. -/\ndef a (n : ℕ) : ℕ :=\n  ∑ k ∈ Finset.range (n / 2 + 1),\n    let diff : ℤ := (n.choose k : ℤ) - (if k = 0 then 0 else (n.choose (k - 1) : ℤ))\n    (diff ^ 3).toNat\n\n/-- Value of the sequence `a` at 0. -/\n@[category test, AMS 11]\ntheorem a_0 : a 0 = 1 := by rfl\n\n/-- Value of the sequence `a` at 1. -/\n@[category test, AMS 11]\ntheorem a_1 : a 1 = 1 := by rfl\n\n/-- Value of the sequence `a` at 2. -/\n@[category test, AMS 11]\ntheorem a_2 : a 2 = 2 := by rfl\n\n/-- Value of the sequence `a` at 3. -/\n@[category test, AMS 11]\ntheorem a_3 : a 3 = 9 := by rfl\n\n/-- Value of the sequence `a` at 4. -/\n@[category test, AMS 11]\ntheorem a_4 : a 4 = 36 := by rfl\n\n/-- Auxiliary sequence $b(n) = a(2n-1)$. -/\ndef b (n : ℕ) : ℕ :=\n  a (2 * n - 1)\n\nset_option linter.style.formal_proof_palomar false in\n/--\n\"Conjecture: Let $b(n) = a(2n-1)$. Then the supercongruence\n$b(np^k) \\equiv b(np^{k-1}) \\pmod{p^{3k}}$ holds for positive integers $n$ and $k$\nand all primes $p \\ge 5$.\"\n- Peter Bala, Mar 20 2023.\n\nLean formalization by Wentao Li, with AI assistance; see [Li26].\n-/\n@[category research solved, AMS 11,\n  formal_proof using lean4 at \"https://github.com/VictorLiwentao/lean-oeis-proofs/blob/41f7b2ba762827a74f1651e76a2ad6d77be6a021/LeanOeisProofs/NewFormalization/A003161.lean#L1717\"]\ntheorem conjecture (n k p : ℕ) (hn : 0 < n) (hk : 0 < k) (hp : p.Prime) (hp_ge : 5 ≤ p) :\n    (b (n * p ^ k) : ℤ) ≡ (b (n * p ^ (k - 1)) : ℤ) [ZMOD (p : ℤ) ^ (3 * k)] := by\n  sorry\n\nend OeisA3161\n",
  "statement_hash": "489a329c3df761b18fee92edfc1d71232283fcc666f625dfa8adb080d959bed5",
  "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."
}