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

10 declarations, 1 contain sorry, 0 declared as axioms

Rowland-style prime-generating recurrence

The sequence is defined by $a(1) = 2$ and for $n \ge 2$: $a(n) = a(n-1) + \gcd(n, a(n-1))$ if $n$ is even, and $a(n) = a(n-1) + \gcd(n-2, a(n-1))$ if $n$ is odd.

References:

Imports (1)
  1. def OeisA166944.a Defining recurrence for $a(n)$ line 40 source

    Source documentation

    Defining recurrence for $a(n)$.

    no axioms what this means

    Statement uses: Nat

    2 instances, coercions and auxiliary constants left out.

    def a : ℕ → ℕ
      | 0 => 0
      | 1 => 2
      | n + 2 =>
        let prev := a (n + 1)
    …
  2. theorem OeisA166944.a_1 Value of the sequence a at 1 line 51 source

    Source documentation

    Value of the sequence a at 1.

    no axioms what this means

    Statement uses: Eq, Nat, OeisA166944.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_1 : a 1 = 2 := by decide
    …

    Mentions: OeisA166944.a

  3. theorem OeisA166944.a_2 Value of the sequence a at 2 line 55 source

    Source documentation

    Value of the sequence a at 2.

    no axioms what this means

    Statement uses: Eq, Nat, OeisA166944.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_2 : a 2 = 4 := by decide
    …

    Mentions: OeisA166944.a

  4. theorem OeisA166944.a_3 Value of the sequence a at 3 line 59 source

    Source documentation

    Value of the sequence a at 3.

    no axioms what this means

    Statement uses: Eq, Nat, OeisA166944.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_3 : a 3 = 5 := by decide
    …

    Mentions: OeisA166944.a

  5. theorem OeisA166944.a_4 Value of the sequence a at 4 line 63 source

    Source documentation

    Value of the sequence a at 4.

    no axioms what this means

    Statement uses: Eq, Nat, OeisA166944.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_4 : a 4 = 6 := by decide
    …

    Mentions: OeisA166944.a

  6. theorem OeisA166944.a_5 Value of the sequence a at 5 line 67 source

    Source documentation

    Value of the sequence a at 5.

    no axioms what this means

    Statement uses: Eq, Nat, OeisA166944.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_5 : a 5 = 9 := by decide

    Mentions: OeisA166944.a

  7. def OeisA166944.d The difference sequence $d(n) = a(n) - a(n-1)$ for $n \ge 2$ line 70 source

    Source documentation

    The difference sequence $d(n) = a(n) - a(n-1)$ for $n \ge 2$.

    no axioms what this means

    Statement uses: Nat

    Proof uses: HSub.hSub, OeisA166944.a, OfNat.ofNat

    3 instances, coercions and auxiliary constants left out.

    def d (n : ℕ) : ℕ := a n - a (n - 1)

    Mentions: OeisA166944.a

  8. def OeisA166944.IsGreaterTwinPrime A prime $p$ is the greater of a twin prime pair if $p$ and $p - 2$ are both prime line 73 source

    Source documentation

    A prime $p$ is the greater of a twin prime pair if $p$ and $p - 2$ are both prime.

    standard axioms: propext what this means

    Statement uses: Nat

    Proof uses: And, Nat.Prime, HSub.hSub, OfNat.ofNat

    3 instances, coercions and auxiliary constants left out.

    def IsGreaterTwinPrime (p : ℕ) : Prop := p.Prime ∧ (p - 2).Prime
  9. def OeisA166944.IsDifferenceRecord A value $R$ is a difference record if there exists $n \ge 2$ such that $d(n) = R$ and $R$ is strictly larger than all previous differences $d(k)$ for $2 \le k < n$ line 78 source

    Source documentation

    A value $R$ is a difference record if there exists $n \ge 2$ such that $d(n) = R$ and $R$ is strictly larger than all previous differences $d(k)$ for $2 \le k < n$.

    no axioms what this means

    Statement uses: Nat

    Proof uses: Exists, And, LE.le, OfNat.ofNat, Eq, OeisA166944.d, LT.lt

    3 instances, coercions and auxiliary constants left out.

    def IsDifferenceRecord (R : ℕ) : Prop :=
    …
  10. theorem OeisA166944.conjecture Conjecture: Every record of differences $a(n)-a(n-1)$ more than 5 is the greater of twin primes (A006512) sorry line 85 source

    Source documentation

    Conjecture: Every record of differences $a(n)-a(n-1)$ more than 5 is the greater of twin primes (A006512).

    depends on sorry what this means

    Statement uses: Nat, LT.lt, OfNat.ofNat, OeisA166944.IsDifferenceRecord, OeisA166944.IsGreaterTwinPrime

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

    4 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

    theorem conjecture (R : ℕ) (hR : 5 < R) (hrec : IsDifferenceRecord R) :
        IsGreaterTwinPrime R := by
    …

    Mentions: OeisA166944.IsDifferenceRecord, OeisA166944.IsGreaterTwinPrime