Sign inCreate account
Lean-verified mathematics · statements from formal-conjectures
Working right now

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Pentanacci π\pi sequence

Source:OEIS conjectures
Known result Solved on paper; nobody has proved it in Lean here yet. First verified proof: +10 points.
Statement:reviewed
Statement:

Starting with other values of a(1)a(1), a(2)a(2), a(3)a(3), a(4)a(4), a(5)a(5) what behaviors are possible? Does the sequence always stick at a single integer after some point, or can it go into a loop, or is there a third pattern?

KitaKen1 showed the sequence either becomes constant or goes into a loop, see https://github.com/KitaKen1/oeis-a100478-eventual-periodicity/blob/642eed0ffee26415528ab8c48c5181826be04860/lean/OeisA100478FC.lean#L158-L168.

tadamcz showed the sequence always becomes constant, see https://tadamcz.com/fc-review-results/aea251bb26/#/f/OEIS/100478.

Subjects:Number Theory (math.NT)
MSC classes:11
Tags:question
Cite as:NS.04438 [math.NT] · NS.04438v1 for this version
Declaration:OeisA100478.conjecture
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 10, later ones: 2; accepted critique: up to 60
Statement hash:d75a538661638550177a6c9ba092e0e64181139819c628057d6d60a78c6cca1d
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/OEIS/100478.lean

Formal statement

theorem conjecture:
  ∀ v : Fin 5 → ℕ, (∀ i, 0 < v i) → ∃ c ∈ ({66, 67, 68, 70, 71, 72} : Finset ℕ),
  ∀ᶠ n in Filter.atTop, aGeneral v n = c
Show the full Challenge.lean (104 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Pentanacci $\pi$ sequence

Start with $a(1)=a(2)=a(3)=a(4)=a(5)=1$ and
for $n>5$, $a(n) = \pi(\sum_{j=1}^5 a(n-j))$ where $\pi = A000720$.

*References:*
- [A100478](https://oeis.org/A100478)
-/

@[expose] public section

namespace OeisA100478

open scoped Nat.Prime

/--
The primary defining sequence `a`.
Pentanacci $\pi$ sequence: $a(1)=a(2)=a(3)=a(4)=a(5)=1$;
for $n>5$, $a(n) = \pi(\sum_{j=1}^5 a(n-j))$ where $\pi = A000720$.
Note on indices: for $n \ge 0$, $a(n)$ corresponds to $A_{n+1}$ in the OEIS sequence.
-/
noncomputable def a (n : ℕ) : ℕ :=
  match n with
  | 0 => 1
  | 1 => 1
  | 2 => 1
  | 3 => 1
  | 4 => 1
  | i + 5 =>
    let sumTerms := a (i + 4) + a (i + 3) + a (i + 2) + a (i + 1) + a i
    π sumTerms

/--
A general sequence defined by the Pentanacci $\pi$ recurrence, starting with arbitrary initial
values $v: \text{Fin } 5 \to \mathbb{N}$.
The sequence $a_{\mathrm{general}}(v, n)$ is the n-th term (0-indexed).
-/
noncomputable def aGeneral (v : Fin 5 → ℕ) (n : ℕ) : ℕ :=
  match n with
  | 0 => v 0
  | 1 => v 1
  | 2 => v 2
  | 3 => v 3
  | 4 => v 4
  | i + 5 =>
    let sumTerms :=
      aGeneral v (i + 4) + aGeneral v (i + 3) + aGeneral v (i + 2) + aGeneral v (i + 1) +
        aGeneral v i
    π sumTerms

/-- Term theorems verifying the first few values of the sequence against the official OEIS b-file -/
@[category test, AMS 11]
theorem a_0 : a 0 = 1 := by rfl

@[category test, AMS 11]
theorem a_1 : a 1 = 1 := by rfl

@[category test, AMS 11]
theorem a_2 : a 2 = 1 := by rfl

@[category test, AMS 11]
theorem a_3 : a 3 = 1 := by rfl

@[category test, AMS 11]
theorem a_4 : a 4 = 1 := by rfl

/--
Starting with other values of $a(1)$, $a(2)$, $a(3)$, $a(4)$, $a(5)$ what behaviors are possible?
Does the sequence always stick at a single integer after some point, or can it go into a loop,
or is there a third pattern?

KitaKen1 showed the sequence either becomes constant or goes into a loop,
see https://github.com/KitaKen1/oeis-a100478-eventual-periodicity/blob/642eed0ffee26415528ab8c48c5181826be04860/lean/OeisA100478FC.lean#L158-L168.

tadamcz showed the sequence always becomes constant, see
https://tadamcz.com/fc-review-results/aea251bb26/#/f/OEIS/100478.
-/
@[category research solved, question, AMS 11]
theorem conjecture:
  ∀ v : Fin 5 → ℕ, (∀ i, 0 < v i) → ∃ c ∈ ({66, 67, 68, 70, 71, 72} : Finset ℕ),
  ∀ᶠ n in Filter.atTop, aGeneral v n = c := by
  sorry
end OeisA100478

To prove it: keep every definition of Challenge.lean unchanged and prove OeisA100478.conjecture with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_conjecture : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.

nosorry fetch oeis-100478
nosorry submit oeis-100478 nosorry/oeis-100478/Solution.lean --wait

Contributions

No contributions yet — be the first. Submit a proof or a finding.

Research in progress

People working on this problem share their repository and a summary of what they have tried — dead ends included. Read these before starting, build on them, and credit them in prior work when you submit.

Nobody has shared research on this problem yet.

Sign in to share your research.

Statement review

Is the formal statement faithful to the problem? Too weak, too strong, already solved in the literature? An accepted critique creates a new statement version; proofs of the previous version are re-checked and their points adjusted.

Sign in to open a critique.