{
  "id": "4940",
  "ident": "NS.04940",
  "slug": "oeis-141057",
  "title": "Number of Abelian cubes of length $3n$ over an alphabet of size 3",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Conjecture: the supercongruences $a(n \\cdot p^k) \\equiv a(n \\cdot p^{k-1}) \\pmod{p^{3k}}$ hold\nfor primes $p \\ge 5$ and positive integers $n$ and $k$.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "formal_proof"
  ],
  "collection": "oeis",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "OeisA141057.conjecture1",
  "statement_lean": "theorem conjecture1 (p k n : ℕ) (hp : p.Prime) (h_p_ge_5 : 5 ≤ p) (h_k_pos : 1 ≤ k)\n    (h_n_pos : 1 ≤ n) :\n    (a (n * p ^ k) : ℤ) ≡ a (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# Number of Abelian cubes of length $3n$ over an alphabet of size 3\n\nAn Abelian cube is a string of the form $x x' x''$ with $|x| = |x'| = |x''|$ and $x$ is a\npermutation of $x'$ and $x''$. The number of Abelian cubes of length $3n$ over an alphabet of\nsize 3 is given by\n$$a(n) = \\sum_{k=0}^n \\binom{n}{k}^3 \\sum_{j=0}^k \\binom{k}{j}^3.$$\n\n*References:*\n- [A141057](https://oeis.org/A141057)-/\n\n@[expose] public section\n\nnamespace OeisA141057\n\n/-- Number of Abelian cubes of length $3n$ over an alphabet of size 3. -/\ndef a (n : ℕ) : ℕ :=\n  ∑ k ∈ Finset.range (n + 1), (n.choose k ^ 3) * ∑ j ∈ Finset.range (k + 1), (k.choose j ^ 3)\n\n/-- Value of the sequence `a` at 0. -/\n@[category test, AMS 11]\ntheorem a_0 : a 0 = 1 := by decide\n\n/-- Value of the sequence `a` at 1. -/\n@[category test, AMS 11]\ntheorem a_1 : a 1 = 3 := by decide\n\n/-- Value of the sequence `a` at 2. -/\n@[category test, AMS 11]\ntheorem a_2 : a 2 = 27 := by decide\n\n/-- Value of the sequence `a` at 3. -/\n@[category test, AMS 11]\ntheorem a_3 : a 3 = 381 := by decide\n\n/-- Value of the sequence `a` at 4. -/\n@[category test, AMS 11]\ntheorem a_4 : a 4 = 6219 := by decide\n\nset_option linter.style.formal_proof_palomar false in\n/--\nConjecture: the supercongruences $a(n \\cdot p^k) \\equiv a(n \\cdot p^{k-1}) \\pmod{p^{3k}}$ hold\nfor primes $p \\ge 5$ and positive integers $n$ and $k$.-/\n@[category research solved, AMS 11,\n  formal_proof using lean4 at \"https://github.com/epoch-research/LeanOpenProblems-results/blob/f02efd9a8c5fc6a735d2a90c33e24f7278ce0ffc/runs/oeis-full-50usd-ant-j0j0g4uzligm1k41/oeis_a141057_supercongruence_conjecture/Submission/Spec.lean#L955\"]\ntheorem conjecture1 (p k n : ℕ) (hp : p.Prime) (h_p_ge_5 : 5 ≤ p) (h_k_pos : 1 ≤ k)\n    (h_n_pos : 1 ≤ n) :\n    (a (n * p ^ k) : ℤ) ≡ a (n * p ^ (k - 1)) [ZMOD (p ^ (3 * k))] := by\n  sorry\n\n/-- Extension of the sequence $a$ to all integers $n \\in \\mathbb{Z}$.\nFor $n < 0$, $a(n) = \\sum_{k=0}^{-n} \\binom{n}{k}^3 \\sum_{j=0}^k \\binom{k}{j}^3$,\nwhere $\\binom{n}{k} = (-1)^k \\binom{-n+k-1}{k}$. -/\ndef aInt (n : ℤ) : ℤ :=\n  if 0 ≤ n then\n    let nNat := n.toNat\n    (∑ k ∈ Finset.range (nNat + 1), (nNat.choose k ^ 3) * ∑ j ∈ Finset.range (k + 1), (k.choose j ^ 3) : ℕ)\n  else\n    let nNat := (-n).toNat\n    ∑ k ∈ Finset.range (nNat + 1), ((-1 : ℤ) ^ k * (nNat + k - 1).choose k : ℤ) ^ 3 *\n      ∑ j ∈ Finset.range (k + 1), ((k.choose j : ℤ) ^ 3)\n\n/-- Value of the sequence `aInt` at -1. -/\n@[category test, AMS 11]\ntheorem aInt_neg_1 : aInt (-1) = -1 := by decide\n\n/-- Value of the sequence `aInt` at -2. -/\n@[category test, AMS 11]\ntheorem aInt_neg_2 : aInt (-2) = 255 := by decide\n\nset_option linter.style.formal_proof_palomar false in\n/--\nConjecture (Peter Bala, 2022):\nThe supercongruences $a(n \\cdot p^k) \\equiv a(n \\cdot p^{k-1}) \\pmod{p^{3k}}$ hold\nfor the integer-indexed extension $a(n)$ for all $n \\in \\mathbb{Z} \\setminus \\{0\\}$, primes $p \\ge 5$,\nand $k \\ge 1$.\n\nProved in Lean by Jensen Kohlmeyer and Liam Kruer, extending the positive-index\nproof by Epoch Research.\n-/\n@[category research solved, AMS 11,\n  formal_proof using lean4 at \"https://github.com/JENW1N/complete-math-solutions/blob/8b9db1d8c0ded5398d5e4e4bbdf8f2ec14ce5c23/proofs/BalaA141057Conjecture.lean#L1416\"]\ntheorem conjecture2 (p k : ℕ) (n : ℤ) (hp : p.Prime) (h_p_ge_5 : 5 ≤ p) (h_k_pos : 1 ≤ k)\n    (hn : n ≠ 0) :\n    aInt (n * (p ^ k : ℤ)) ≡ aInt (n * (p ^ (k - 1) : ℤ)) [ZMOD (p ^ (3 * k) : ℤ)] := by\n  sorry\n\nend OeisA141057\n",
  "statement_hash": "c5db401b1b3e0d86b3987b9ba5b9c581d002d46462c9c9490bc3816691ec16e5",
  "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."
}