{
  "id": "5283",
  "ident": "NS.05283",
  "slug": "oeis-212334",
  "title": "Balanced walks on a 4-dimensional cubic lattice with neighbor steps",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "\"It appears that for primes $p \\ge 5$, $a(p) \\equiv 1 \\pmod{p^5}$.\"\n- _Peter Bala_, Dec 12 2021",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [],
  "collection": "oeis",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "OeisA212334.conjecture_1",
  "statement_lean": "theorem conjecture_1 (p : ℕ) (hp : p.Prime) (hp5 : 5 ≤ p) :\n    a p % (p ^ 5) = 1",
  "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# Balanced walks on a 4-dimensional cubic lattice with neighbor steps\n\nThe sequence $a(n)$ counts the words over a $4$-ary alphabet (either empty or starting with the\nfirst letter) in which each letter occurs $n$ times and adjacent letters are equal or adjacent in\nthe alphabet. Equivalently,\n$$a(n) = \\sum_{k=0}^{n-1} \\binom{n}{k} \\binom{n-1}{k} \\binom{n+k-1}{k}^2$$\nfor $n \\ge 1$ and $a(0) = 1$.\n\n*References:*\n- [A212334](https://oeis.org/A212334)\n-/\n\n@[expose] public section\n\nnamespace OeisA212334\n\n/-- Number of words over a $4$-ary alphabet where each letter occurs $n$ times and adjacent\nletters are equal or neighbors, given by\n$a(n) = \\sum_{k=0}^{n-1} \\binom{n}{k} \\binom{n-1}{k} \\binom{n+k-1}{k}^2$ for $n \\ge 1$ and\n$a(0) = 1$. -/\ndef a (n : ℕ) : ℕ :=\n  if n = 0 then 1\n  else\n    ∑ k ∈ Finset.range n, n.choose k * (n - 1).choose k * (n + k - 1).choose k ^ 2\n\n@[category test, AMS 11]\ntheorem a_0 : a 0 = 1 := by decide\n\n@[category test, AMS 11]\ntheorem a_1 : a 1 = 1 := by decide\n\n@[category test, AMS 11]\ntheorem a_2 : a 2 = 9 := by decide\n\n@[category test, AMS 11]\ntheorem a_3 : a 3 = 163 := by decide\n\n@[category test, AMS 11]\ntheorem a_4 : a 4 = 3593 := by decide\n\n/--\n\"It appears that for primes $p \\ge 5$, $a(p) \\equiv 1 \\pmod{p^5}$.\"\n- _Peter Bala_, Dec 12 2021\n-/\n@[category research open, AMS 11]\ntheorem conjecture_1 (p : ℕ) (hp : p.Prime) (hp5 : 5 ≤ p) :\n    a p % (p ^ 5) = 1 := by\n  sorry\n\n/--\n\"Conjecture: for $r \\ge 2$, and all primes $p \\ge 5$,\n$a(p^r) \\equiv a(p^{r-1}) \\pmod{p^{3r+3}}$.\"\n- _Peter Bala_, Oct 13 2022\n-/\n@[category research open, AMS 11]\ntheorem conjecture_2 (p r : ℕ) (hp : p.Prime) (hp5 : 5 ≤ p) (hr2 : 2 ≤ r) :\n    a (p ^ r) % (p ^ (3 * r + 3)) = a (p ^ (r - 1)) % (p ^ (3 * r + 3)) := by\n  sorry\n\nend OeisA212334\n",
  "statement_hash": "97e90571c17a1a4ea1f9e7f1c4277ff19bae9ed504615a9b2c395f4fdbb3700f",
  "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."
}