FormalConjectures/OEIS/107247.lean

GitHub source file

Explanation legend Lean4 Domain Explanation Language (L4DEL)

L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.

L4DEL
Lean4 Domain Explanation Language

Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.

Project sources: Pinned project documentation, Formal Conjectures paper, arXiv v1

9 declarations, 2 contain sorry, 0 declared as axioms

Sum of squares of nonacci numbers

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

References:

Imports (1)
  1. def OeisA107247.nonacci Nonacci number (Fibonacci 9-step number) line 36 source

    Source documentation

    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$.

    no axioms what this means

    Statement uses: Nat

    2 instances, coercions and auxiliary constants left out.

    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.

    Mentions: OeisA107247.a

  2. def OeisA107247.a The primary defining sequence a line 49 source

    Source documentation

    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.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Nat

    Proof uses: Finset.sum, Finset.range, HAdd.hAdd, OfNat.ofNat, HPow.hPow, OeisA107247.nonacci

    8 instances, coercions and auxiliary constants left out.

    def a (n : ℕ) : ℕ :=
    …
  3. theorem OeisA107247.a_0 Term theorems verifying the first few values of the sequence against the official OEIS b-file line 54 source

    Source documentation

    Term theorems verifying the first few values of the sequence against the official OEIS b-file

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Eq, Nat, OeisA107247.a, OfNat.ofNat

    Proof uses: of_decide_eq_true, id, Bool, Decidable.decide, Bool.true, Eq.refl

    3 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

    theorem a_0 : a 0 = 0 := by decide
    …

    Mentions: OeisA107247.a

  4. theorem OeisA107247.a_1 line 57 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Eq, Nat, OeisA107247.a, OfNat.ofNat

    Proof uses: of_decide_eq_true, id, Bool, Decidable.decide, Bool.true, Eq.refl

    3 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

  5. theorem OeisA107247.a_2 line 60 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Eq, Nat, OeisA107247.a, OfNat.ofNat

    Proof uses: of_decide_eq_true, id, Bool, Decidable.decide, Bool.true, Eq.refl

    3 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

  6. theorem OeisA107247.a_3 line 63 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Eq, Nat, OeisA107247.a, OfNat.ofNat

    Proof uses: of_decide_eq_true, id, Bool, Decidable.decide, Bool.true, Eq.refl

    3 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

  7. theorem OeisA107247.a_4 line 66 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Eq, Nat, OeisA107247.a, OfNat.ofNat

    Proof uses: of_decide_eq_true, id, Bool, Decidable.decide, Bool.true, Eq.refl

    3 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

  8. theorem OeisA107247.known_prime_and_semiprimes Primes in this sequence include: $a(8) = 2$ sorry line 78 source

    Source documentation

    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).

    depends on sorry what this means

    Statement uses: And, Nat.Prime, OeisA107247.a, OfNat.ofNat, Nat, Nat.IsSemiprime

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous

    2 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

    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
    …

    Mentions: OeisA107247.a

  9. theorem OeisA107247.conjecture Primes in this sequence include: $a(8) = 2$, which is next? sorry line 94 source

    Source documentation

    Primes in this sequence include: $a(8) = 2$, which is next?

    depends on sorry what this means

    Statement uses: Eq, Nat, sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous, OfNat.ofNat, OeisA107247.a, InfSet.sInf, Set.ofPred, And, LT.lt, Nat.Prime

    6 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

    theorem conjecture :
        answer(sorry) = a (sInf {n : ℕ | 8 < n ∧ (a n).Prime}) := by
    …

    Mentions: OeisA107247.a