FormalConjectures/OEIS/166944.lean
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:
- A166944
- E. S. Rowland, "A natural prime-generating recurrence", J. Integer Sequences 11 (2008), Article 08.2.8.
- V. Shevelev, "An infinite set of generators of primes based on the Rowland idea and conjectures concerning twin primes", arXiv preprint arXiv:0910.4676 [math.NT], 2009.
Imports (1)
- def
OeisA166944.aDefining recurrence for $a(n)$ line 40 sourceSource documentation
Defining recurrence for $a(n)$.
no axioms what this means
Statement uses:
Nat2 instances, coercions and auxiliary constants left out.
def a : ℕ → ℕ | 0 => 0 | 1 => 2 | n + 2 => let prev := a (n + 1) … - theorem
OeisA166944.a_1Value of the sequenceaat 1 line 51 sourceSource documentation
Value of the sequence
aat 1.no axioms what this means
Statement uses:
Eq,Nat, OeisA166944.a,OfNat.ofNatProof uses:
of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl3 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
- theorem
OeisA166944.a_2Value of the sequenceaat 2 line 55 sourceSource documentation
Value of the sequence
aat 2.no axioms what this means
Statement uses:
Eq,Nat, OeisA166944.a,OfNat.ofNatProof uses:
of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl3 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
- theorem
OeisA166944.a_3Value of the sequenceaat 3 line 59 sourceSource documentation
Value of the sequence
aat 3.no axioms what this means
Statement uses:
Eq,Nat, OeisA166944.a,OfNat.ofNatProof uses:
of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl3 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
- theorem
OeisA166944.a_4Value of the sequenceaat 4 line 63 sourceSource documentation
Value of the sequence
aat 4.no axioms what this means
Statement uses:
Eq,Nat, OeisA166944.a,OfNat.ofNatProof uses:
of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl3 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
- theorem
OeisA166944.a_5Value of the sequenceaat 5 line 67 sourceSource documentation
Value of the sequence
aat 5.no axioms what this means
Statement uses:
Eq,Nat, OeisA166944.a,OfNat.ofNatProof uses:
of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl3 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
- def
OeisA166944.dThe difference sequence $d(n) = a(n) - a(n-1)$ for $n \ge 2$ line 70 sourceSource documentation
The difference sequence $d(n) = a(n) - a(n-1)$ for $n \ge 2$.
no axioms what this means
Statement uses:
NatProof uses:
HSub.hSub, OeisA166944.a,OfNat.ofNat3 instances, coercions and auxiliary constants left out.
def d (n : ℕ) : ℕ := a n - a (n - 1)
Mentions: OeisA166944.a
- def
OeisA166944.IsGreaterTwinPrimeA prime $p$ is the greater of a twin prime pair if $p$ and $p - 2$ are both prime line 73 sourceSource 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:
NatProof uses:
And,Nat.Prime,HSub.hSub,OfNat.ofNat3 instances, coercions and auxiliary constants left out.
def IsGreaterTwinPrime (p : ℕ) : Prop := p.Prime ∧ (p - 2).Prime
- def
OeisA166944.IsDifferenceRecordA 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 sourceSource 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:
NatProof uses:
Exists,And,LE.le,OfNat.ofNat,Eq, OeisA166944.d,LT.lt3 instances, coercions and auxiliary constants left out.
def IsDifferenceRecord (R : ℕ) : Prop := …
- theorem
OeisA166944.conjectureConjecture: Every record of differences $a(n)-a(n-1)$ more than 5 is the greater of twin primes (A006512) sorry line 85 sourceSource 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.IsGreaterTwinPrimeProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous4 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