FormalConjectures/OEIS/182126.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
11 declarations, 3 contain sorry, 0 declared as axioms
Product of two consecutive primes modulo the next prime
The sequence is defined by $$a(n) = \mathrm{prime}(n) \cdot \mathrm{prime}(n+1) \bmod \mathrm{prime}(n+2),$$ where $\mathrm{prime}(k)$ is the $k$-th prime number ($\mathrm{prime}(1)=2$).
References:
Imports (1)
- def
OeisA182126.prime$\mathrm{prime}(k)$ is the $k$-th prime number ($\mathrm{prime}(1) = 2$) line 35 sourceSource documentation
$\mathrm{prime}(k)$ is the $k$-th prime number ($\mathrm{prime}(1) = 2$).
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
Nat.nth,Nat.Prime,HSub.hSub,OfNat.ofNat3 instances, coercions and auxiliary constants left out.
noncomputable def prime (k : ℕ) : ℕ := Nat.nth Nat.Prime (k - 1)
- def
OeisA182126.a$a(n) = \mathrm{prime}(n) \cdot \mathrm{prime}(n+1) \bmod \mathrm{prime}(n+2)$ line 38 sourceSource documentation
$a(n) = \mathrm{prime}(n) \cdot \mathrm{prime}(n+1) \bmod \mathrm{prime}(n+2)$.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
ite,Eq,OfNat.ofNat,HMod.hMod,HMul.hMul, OeisA182126.prime,HAdd.hAdd8 instances, coercions and auxiliary constants left out.
noncomputable def a (n : ℕ) : ℕ := …
- theorem
OeisA182126.a_1line 43 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Nat, OeisA182126.a,OfNat.ofNatProof uses:
Nat.nth,Nat.Prime,Nat.nth_count,of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl,Eq.mpr,HMod.hMod,HMul.hMul,congrArg7 instances, coercions and auxiliary constants left out.
Tactic trace: 8 steps
Open to load the checked before-and-after goal states.
- theorem
OeisA182126.a_2line 51 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Nat, OeisA182126.a,OfNat.ofNatProof uses:
Nat.nth,Nat.Prime,Nat.nth_count,of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl,Eq.mpr,HMod.hMod,HMul.hMul,congrArg7 instances, coercions and auxiliary constants left out.
Tactic trace: 8 steps
Open to load the checked before-and-after goal states.
- theorem
OeisA182126.a_3line 59 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Nat, OeisA182126.a,OfNat.ofNatProof uses:
Nat.nth,Nat.Prime,Nat.nth_count,of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl,Eq.mpr,HMod.hMod,HMul.hMul,congrArg7 instances, coercions and auxiliary constants left out.
Tactic trace: 8 steps
Open to load the checked before-and-after goal states.
- theorem
OeisA182126.a_4line 67 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Nat, OeisA182126.a,OfNat.ofNatProof uses:
Nat.nth,Nat.Prime,Nat.nth_count,of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl,Eq.mpr,HMod.hMod,HMul.hMul,congrArg7 instances, coercions and auxiliary constants left out.
Tactic trace: 8 steps
Open to load the checked before-and-after goal states.
- def
OeisA182126.countACount of occurrences of value $v$ among $a(1), \dots, a(x)$ line 75 sourceSource documentation
Count of occurrences of value $v$ among $a(1), \dots, a(x)$.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
Finset.card,Finset.filter,And,LE.le,OfNat.ofNat,Eq, OeisA182126.a,Finset.range,HAdd.hAdd7 instances, coercions and auxiliary constants left out.
noncomputable def countA (x v : ℕ) : ℕ := …
- def
OeisA182126.IsMostFrequent$v_0$ is a most frequent value among $a(1), \dots, a(x)$ line 79 sourceSource documentation
$v_0$ is a most frequent value among $a(1), \dots, a(x)$.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
LE.le, OeisA182126.countA1 instances, coercions and auxiliary constants left out.
def IsMostFrequent (x v₀ : ℕ) : Prop := …
- theorem
OeisA182126.conjecture1Conjecture: For $x > 10^9$, the most frequent value in $a(n)$, $n=1\dots x$, has form $120k$ sorry line 86 sourceSource documentation
Conjecture: For $x > 10^9$, the most frequent value in $a(n)$, $n=1\dots x$, has form $120k$.
depends on sorry what this means
Statement uses:
Nat,LT.lt,HPow.hPow,OfNat.ofNat, OeisA182126.IsMostFrequent,Dvd.dvdProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous14 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem conjecture1 (x : ℕ) (hx : 10 ^ 9 < x) (v₀ : ℕ) (hv : IsMostFrequent x v₀) : 120 ∣ v₀ := by …Mentions: OeisA182126.IsMostFrequent
- theorem
OeisA182126.conjecture2Let $b = \mathrm{prime}(n+2) - \mathrm{prime}(n)$ and $c = \mathrm{prime}(n+2) - \mathrm{prime}(n+1)$ sorry line 96 sourceSource documentation
Let $b = \mathrm{prime}(n+2) - \mathrm{prime}(n)$ and $c = \mathrm{prime}(n+2) - \mathrm{prime}(n+1)$. Conjecture: for $n > 61$, $a(n) = b \cdot c$.
- Charles R Greathouse IV, May 11 2012
depends on sorry what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat,HSub.hSub, OeisA182126.prime,HAdd.hAdd,Eq, OeisA182126.a,HMul.hMulProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous16 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem conjecture2 (n : ℕ) (hn : 61 < n) : let b := prime (n + 2) - prime n …Mentions: OeisA182126.prime
- theorem
OeisA182126.conjecture3Are 2, 7, 11, 13, 29 the only primes in this sequence? sorry line 107 sourceSource documentation
Are 2, 7, 11, 13, 29 the only primes in this sequence?
- Hugo Pfoertner, Sep 22 2025
depends on sorry what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat,Iff,Nat.Prime, OeisA182126.a,Membership.mem,List,List.cons,List.nilProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous6 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem conjecture3 (n : ℕ) (hn : 0 < n) : (a n).Prime ↔ a n ∈ ([2, 7, 11, 13, 29] : List ℕ) := by …Mentions: OeisA182126.a