{
  "id": "4568",
  "ident": "NS.04568",
  "slug": "oeis-107247",
  "title": "Sum of squares of nonacci numbers",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "Primes in this sequence include: $a(8) = 2$, which is next?",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question"
  ],
  "collection": "oeis",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "OeisA107247.conjecture",
  "statement_lean": "theorem conjecture :\n    conjecture.answer = a (sInf {n : ℕ | 8 < n ∧ (a n).Prime})",
  "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# Sum of squares of nonacci numbers\n\nSum of squares of nonacci numbers (Fibonacci 9-step numbers).\n\n*References:*\n- [A107247](https://oeis.org/A107247)\n-/\n\n@[expose] public section\n\nnamespace OeisA107247\n\n/-- Nonacci number (Fibonacci 9-step number).\n$F_9(n)$ is defined by the linear recurrence $F_9(n+9) = \\sum_{i=0}^8 F_9(n+i)$,\nwith $F_9(0) = \\dots = F_9(7) = 0$ and $F_9(8) = 1$. -/\ndef nonacci : ℕ → ℕ\n  | 0 => 0 | 1 => 0 | 2 => 0 | 3 => 0 | 4 => 0 | 5 => 0 | 6 => 0 | 7 => 0\n  | 8 => 1\n  | n + 9 =>\n    nonacci (n + 8) + nonacci (n + 7) + nonacci (n + 6) + nonacci (n + 5) +\n    nonacci (n + 4) + nonacci (n + 3) + nonacci (n + 2) + nonacci (n + 1) + nonacci n\n\n/--\nThe primary defining sequence `a`.\n`a n` is the sum of squares of nonacci numbers (Fibonacci 9-step numbers).\nThe official sequence matches the sum up to `n + 1` of the standard nonacci numbers\nto align with the offset.\n-/\ndef a (n : ℕ) : ℕ :=\n  ∑ k ∈ Finset.range (n + 2), (nonacci k) ^ 2\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 = 0 := by decide\n\n@[category test, AMS 11]\ntheorem a_1 : a 1 = 0 := by decide\n\n@[category test, AMS 11]\ntheorem a_2 : a 2 = 0 := by decide\n\n@[category test, AMS 11]\ntheorem a_3 : a 3 = 0 := by decide\n\n@[category test, AMS 11]\ntheorem a_4 : a 4 = 0 := by decide\n\n/--\nPrimes in this sequence include: $a(8) = 2$.\nSemiprimes in this sequence include: $a(9) = 6 = 2 * 3$, $a(10) = 22 = 2 * 11$,\n$a(11) = 86 = 2 * 43$, $a(13) = 1366 = 2 * 683$, $a(14) = 5462 = 2 * 2731$,\n$a(16) = 87382 = 2 * 43691$, $a(17) = 348503 = 37 * 9419$,\n$a(27) = 358201316657 = 71 * 5045088967$.\n(Note: The OEIS comment uses 1-based indexing, so their indices are shifted by +1 compared\nto this formalization).\n-/\n@[category textbook, AMS 11]\ntheorem known_prime_and_semiprimes :\n  (a 8).Prime ∧\n  (a 9).IsSemiprime ∧\n  (a 10).IsSemiprime ∧\n  (a 11).IsSemiprime ∧\n  (a 13).IsSemiprime ∧\n  (a 14).IsSemiprime ∧\n  (a 16).IsSemiprime ∧\n  (a 17).IsSemiprime ∧\n  (a 27).IsSemiprime := by\n  sorry\n\ndef conjecture.answer : ℕ := sorry\n\n/--\nPrimes in this sequence include: $a(8) = 2$, which is next?\n-/\n@[category research open, question value, AMS 11]\ntheorem conjecture :\n    conjecture.answer = a (sInf {n : ℕ | 8 < n ∧ (a n).Prime}) := by\n  sorry\n\nend OeisA107247\n",
  "statement_hash": "fee51ecd5cd6c39d88894350fe7500764c025b1b99b36ee5c7ac5293f7147e51",
  "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."
}