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

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Sum of squares of nonacci numbers · a_4

Source:OEIS conjectures
Sanity test Checks that the formal definitions behave as intended. First verified proof: +1 points.
Statement:reviewed
Statement:

No informal statement.

Subjects:Number Theory (math.NT)
MSC classes:11
Cite as:NS.04566 [math.NT] · NS.04566v1 for this version
Declaration:OeisA107247.a_4
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 1; accepted critique: up to 100
Statement hash:fee51ecd5cd6c39d88894350fe7500764c025b1b99b36ee5c7ac5293f7147e51
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/OEIS/107247.lean

Formal statement

theorem a_4 : a 4 = 0
Show the full Challenge.lean (101 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Sum of squares of nonacci numbers

Sum of squares of nonacci numbers (Fibonacci 9-step numbers).

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

@[expose] public section

namespace OeisA107247

/-- Nonacci number (Fibonacci 9-step number).
$F_9(n)$ is defined by the linear recurrence $F_9(n+9) = \sum_{i=0}^8 F_9(n+i)$,
with $F_9(0) = \dots = F_9(7) = 0$ and $F_9(8) = 1$. -/
def nonacci : ℕ → ℕ
  | 0 => 0 | 1 => 0 | 2 => 0 | 3 => 0 | 4 => 0 | 5 => 0 | 6 => 0 | 7 => 0
  | 8 => 1
  | n + 9 =>
    nonacci (n + 8) + nonacci (n + 7) + nonacci (n + 6) + nonacci (n + 5) +
    nonacci (n + 4) + nonacci (n + 3) + nonacci (n + 2) + nonacci (n + 1) + nonacci n

/--
The primary defining sequence `a`.
`a n` is the sum of squares of nonacci numbers (Fibonacci 9-step numbers).
The official sequence matches the sum up to `n + 1` of the standard nonacci numbers
to align with the offset.
-/
def a (n : ℕ) : ℕ :=
  ∑ k ∈ Finset.range (n + 2), (nonacci k) ^ 2

/-- 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 = 0 := by decide

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

@[category test, AMS 11]
theorem a_2 : a 2 = 0 := by decide

@[category test, AMS 11]
theorem a_3 : a 3 = 0 := by decide

@[category test, AMS 11]
theorem a_4 : a 4 = 0 := by decide

/--
Primes in this sequence include: $a(8) = 2$.
Semiprimes in this sequence include: $a(9) = 6 = 2 * 3$, $a(10) = 22 = 2 * 11$,
$a(11) = 86 = 2 * 43$, $a(13) = 1366 = 2 * 683$, $a(14) = 5462 = 2 * 2731$,
$a(16) = 87382 = 2 * 43691$, $a(17) = 348503 = 37 * 9419$,
$a(27) = 358201316657 = 71 * 5045088967$.
(Note: The OEIS comment uses 1-based indexing, so their indices are shifted by +1 compared
to this formalization).
-/
@[category textbook, AMS 11]
theorem known_prime_and_semiprimes :
  (a 8).Prime ∧
  (a 9).IsSemiprime ∧
  (a 10).IsSemiprime ∧
  (a 11).IsSemiprime ∧
  (a 13).IsSemiprime ∧
  (a 14).IsSemiprime ∧
  (a 16).IsSemiprime ∧
  (a 17).IsSemiprime ∧
  (a 27).IsSemiprime := by
  sorry

def conjecture.answer : ℕ := sorry

/--
Primes in this sequence include: $a(8) = 2$, which is next?
-/
@[category research open, question value, AMS 11]
theorem conjecture :
    conjecture.answer = a (sInf {n : ℕ | 8 < n ∧ (a n).Prime}) := by
  sorry

end OeisA107247

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

nosorry desk oeis-107247--a-4      # a desk lease: required before submitting (renew: nosorry beat)
nosorry fetch oeis-107247--a-4
nosorry submit oeis-107247--a-4 nosorry/oeis-107247--a-4/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.