FormalConjectures/OEIS/382590.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

11 declarations, 1 contain sorry, 0 declared as axioms

Periodicity of $k$-th prime factors in coupled nonlinear recurrence $a(n)$

The sequence $a(n)$ is defined by $a(n) = a(n-1)b(n-2) + a(n-2)b(n-1)$ where $b(n) = a(n-1)b(n-2) - a(n-2)b(n-1)$, with $a(0) = b(0) = b(1) = 1$ and $a(1) = 2$.

References:

Imports (1)
  1. def OeisA382590.abPair Helper function for a, computing the pair $(a(n), b(n))$ such that: $a(n) = a(n-1)b(n-2) + a(n-2)b(n-1)$ $b(n) = a(n-1)b(n-2) - a(n-2)b(n-1)$ line 45 source

    Source documentation

    Helper function for a, computing the pair $(a(n), b(n))$ such that: $a(n) = a(n-1)b(n-2) + a(n-2)b(n-1)$ $b(n) = a(n-1)b(n-2) - a(n-2)b(n-1)$

    no axioms what this means

    Statement uses: Nat, Prod, Int

    2 instances, coercions and auxiliary constants left out.

    def abPair : ℕ → ℤ × ℤ
    | 0 => (1, 1)
    | 1 => (2, 1)
    | n + 2 =>
      let (a_n_plus_1, b_n_plus_1) := abPair (n + 1)
    …
  2. def OeisA382590.a The sequence defined by the mutual recurrence relations line 59 source

    Source documentation

    The sequence defined by the mutual recurrence relations: $a(n) = a(n-1)b(n-2) + a(n-2)b(n-1)$ and $b(n) = a(n-1)b(n-2) - a(n-2)b(n-1)$ starting with $a(0) = b(0) = b(1) = 1$ and $a(1) = 2$. The terms are in $\mathbb{Z}$ due to negative values.

    no axioms what this means

    Statement uses: Nat, Int

    Proof uses: Prod.fst, OeisA382590.abPair

    def a (n : ℕ) : ℤ := (abPair n).fst
    …

    Mentions: OeisA382590.abPair

  3. def OeisA382590.kthPrimeFactor The $k$-th smallest distinct prime factor of an integer $n$ (where $k \ge 1$) line 70 source

    Source documentation

    The $k$-th smallest distinct prime factor of an integer $n$ (where $k \ge 1$). This is defined as the $k$-th element (0-indexed $k-1$) of the increasing list of distinct prime factors of n.natAbs. Returns 1 if n has fewer than k distinct prime factors or if n is 0, 1, or -1, following the informal convention.

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

    Statement uses: Nat, Int

    Proof uses: dite, Eq, OfNat.ofNat, Not, List, List.dedup, Nat.primeFactorsList, Int.natAbs, GE.ge, HSub.hSub, List.length, GetElem.getElem, LT.lt

    9 instances, coercions and auxiliary constants left out.

    def kthPrimeFactor (k : ℕ) (n : ℤ) : ℕ :=
    …
  4. lemma OeisA382590.kthPrimeFactor_two_a_six line 77 source

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

    Statement uses: Eq, Nat, OeisA382590.kthPrimeFactor, OfNat.ofNat, OeisA382590.a

    2 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

  5. lemma OeisA382590.kthPrimeFactor_two_a_seven line 80 source

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

    Statement uses: Eq, Nat, OeisA382590.kthPrimeFactor, OfNat.ofNat, OeisA382590.a

    2 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

  6. lemma OeisA382590.a_0 line 84 source

    no axioms what this means

    Statement uses: Eq, Int, OeisA382590.a, OfNat.ofNat, Nat

    Proof uses: 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. lemma OeisA382590.a_1 line 87 source

    no axioms what this means

    Statement uses: Eq, Int, OeisA382590.a, OfNat.ofNat, Nat

    Proof uses: 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. lemma OeisA382590.a_2 line 90 source

    no axioms what this means

    Statement uses: Eq, Int, OeisA382590.a, OfNat.ofNat, Nat

    Proof uses: Eq.refl

    3 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

  9. lemma OeisA382590.a_3 line 93 source

    no axioms what this means

    Statement uses: Eq, Int, OeisA382590.a, OfNat.ofNat, Nat

    Proof uses: Eq.refl

    3 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

  10. lemma OeisA382590.a_4 line 96 source

    no axioms what this means

    Statement uses: Eq, Int, OeisA382590.a, OfNat.ofNat, Nat

    Proof uses: Eq.refl

    3 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

  11. theorem OeisA382590.kthPrimeFactor_periodic Conjecture: For any $k > 1$, if you take the $k$-th prime factor of each term, you get an eventually periodic sequence sorry line 111 source

    Source documentation

    Conjecture: For any $k > 1$, if you take the $k$-th prime factor of each term, you get an eventually periodic sequence. - Bryle Morga, Mar 31 2025

    Here the $k$-th prime factor of $a(n)$ is the $k$-th smallest distinct prime divisor of $|a(n)|$; for example the second prime factors of $a(5) = 18$, $a(6) = 20$ and $a(7) = 896$ are $3$, $5$ and $7$.

    This was proved by Terence Tao in a MathOverflow answer, using that $a(n)$ divides $a(n+3)$ for all $n$.

    L4DEL explanation

    Conjecture: For any $k > 1$, if you take the $k$-th prime factor of each term, you get an eventually periodic sequence. - Bryle Morga, Mar 31 2025 Here the $k$-th prime factor of $a(n)$ is the $k$-th smallest distinct prime divisor of $|a(n)|$; for example the second prime factors of $a(5) = 18$, $a(6) = 20$ and $a(7) = 896$ are $3$, $5$ and $7$. This was proved by Terence Tao in a MathOverflow answer, using that $a(n)$ divides $a(n+3)$ for all $n$.

    Sources and attribution: Pinned Lean source (1646ca16afd6)

    depends on sorry what this means

    Statement uses: Nat, GE.ge, OfNat.ofNat, Exists, And, GT.gt, Eq, OeisA382590.kthPrimeFactor, OeisA382590.a, HAdd.hAdd

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

    10 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

    theorem kthPrimeFactor_periodic : ∀ k : ℕ, k ≥ 2 → ∃ N₀ p : ℕ, p > 0 ∧
        ∀ n : ℕ, n ≥ N₀ → kthPrimeFactor k (a (n + p)) = kthPrimeFactor k (a n) := by
    …

    Mentions: OeisA382590.kthPrimeFactor, OeisA382590.a