{
  "id": "4438",
  "ident": "NS.04438",
  "slug": "oeis-100478",
  "title": "Pentanacci $\\pi$ sequence",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Starting with other values of $a(1)$, $a(2)$, $a(3)$, $a(4)$, $a(5)$ what behaviors are possible?\nDoes the sequence always stick at a single integer after some point, or can it go into a loop,\nor is there a third pattern?\n\nKitaKen1 showed the sequence either becomes constant or goes into a loop,\nsee https://github.com/KitaKen1/oeis-a100478-eventual-periodicity/blob/642eed0ffee26415528ab8c48c5181826be04860/lean/OeisA100478FC.lean#L158-L168.\n\ntadamcz showed the sequence always becomes constant, see\nhttps://tadamcz.com/fc-review-results/aea251bb26/#/f/OEIS/100478.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question"
  ],
  "collection": "oeis",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "OeisA100478.conjecture",
  "statement_lean": "theorem conjecture:\n  ∀ v : Fin 5 → ℕ, (∀ i, 0 < v i) → ∃ c ∈ ({66, 67, 68, 70, 71, 72} : Finset ℕ),\n  ∀ᶠ n in Filter.atTop, aGeneral v n = c",
  "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# Pentanacci $\\pi$ sequence\n\nStart with $a(1)=a(2)=a(3)=a(4)=a(5)=1$ and\nfor $n>5$, $a(n) = \\pi(\\sum_{j=1}^5 a(n-j))$ where $\\pi = A000720$.\n\n*References:*\n- [A100478](https://oeis.org/A100478)\n-/\n\n@[expose] public section\n\nnamespace OeisA100478\n\nopen scoped Nat.Prime\n\n/--\nThe primary defining sequence `a`.\nPentanacci $\\pi$ sequence: $a(1)=a(2)=a(3)=a(4)=a(5)=1$;\nfor $n>5$, $a(n) = \\pi(\\sum_{j=1}^5 a(n-j))$ where $\\pi = A000720$.\nNote on indices: for $n \\ge 0$, $a(n)$ corresponds to $A_{n+1}$ in the OEIS sequence.\n-/\nnoncomputable def a (n : ℕ) : ℕ :=\n  match n with\n  | 0 => 1\n  | 1 => 1\n  | 2 => 1\n  | 3 => 1\n  | 4 => 1\n  | i + 5 =>\n    let sumTerms := a (i + 4) + a (i + 3) + a (i + 2) + a (i + 1) + a i\n    π sumTerms\n\n/--\nA general sequence defined by the Pentanacci $\\pi$ recurrence, starting with arbitrary initial\nvalues $v: \\text{Fin } 5 \\to \\mathbb{N}$.\nThe sequence $a_{\\mathrm{general}}(v, n)$ is the n-th term (0-indexed).\n-/\nnoncomputable def aGeneral (v : Fin 5 → ℕ) (n : ℕ) : ℕ :=\n  match n with\n  | 0 => v 0\n  | 1 => v 1\n  | 2 => v 2\n  | 3 => v 3\n  | 4 => v 4\n  | i + 5 =>\n    let sumTerms :=\n      aGeneral v (i + 4) + aGeneral v (i + 3) + aGeneral v (i + 2) + aGeneral v (i + 1) +\n        aGeneral v i\n    π sumTerms\n\n/-- Term theorems verifying the first few values of the sequence against the official OEIS b-file -/\n@[category test, AMS 11]\ntheorem a_0 : a 0 = 1 := by rfl\n\n@[category test, AMS 11]\ntheorem a_1 : a 1 = 1 := by rfl\n\n@[category test, AMS 11]\ntheorem a_2 : a 2 = 1 := by rfl\n\n@[category test, AMS 11]\ntheorem a_3 : a 3 = 1 := by rfl\n\n@[category test, AMS 11]\ntheorem a_4 : a 4 = 1 := by rfl\n\n/--\nStarting with other values of $a(1)$, $a(2)$, $a(3)$, $a(4)$, $a(5)$ what behaviors are possible?\nDoes the sequence always stick at a single integer after some point, or can it go into a loop,\nor is there a third pattern?\n\nKitaKen1 showed the sequence either becomes constant or goes into a loop,\nsee https://github.com/KitaKen1/oeis-a100478-eventual-periodicity/blob/642eed0ffee26415528ab8c48c5181826be04860/lean/OeisA100478FC.lean#L158-L168.\n\ntadamcz showed the sequence always becomes constant, see\nhttps://tadamcz.com/fc-review-results/aea251bb26/#/f/OEIS/100478.\n-/\n@[category research solved, question, AMS 11]\ntheorem conjecture:\n  ∀ v : Fin 5 → ℕ, (∀ i, 0 < v i) → ∃ c ∈ ({66, 67, 68, 70, 71, 72} : Finset ℕ),\n  ∀ᶠ n in Filter.atTop, aGeneral v n = c := by\n  sorry\nend OeisA100478\n",
  "statement_hash": "d75a538661638550177a6c9ba092e0e64181139819c628057d6d60a78c6cca1d",
  "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."
}