Title:Product of two consecutive primes modulo the next prime · conjecture2
Statement:Let and . Conjecture: for , .
- Charles R Greathouse IV, May 11 2012
| Subjects: | Number Theory (math.NT) |
| MSC classes: | 11 |
| Cite as: | NS.05105 [math.NT] · NS.05105v1 for this version |
| Declaration: | OeisA182126.conjecture2 |
| Verification: | Lean kernel (formal proof) |
| Points: | first verified proof or disproof: 100, later ones: 10; accepted critique: up to 60 |
| Statement hash: | f0e40ee8996ca55a47c4c90759825af5648b45a55432ca5d902e59cfdf0ba4bc |
| Toolchain: | leanprover/lean4:v4.33.1 |
| Licence: | Apache-2.0 · google-deepmind/formal-conjectures contributors |
| Upstream: | FormalConjectures/OEIS/182126.lean |
Formal statement
theorem conjecture2 (n : ℕ) (hn : 61 < n) :
let b := prime (n + 2) - prime n
let c := prime (n + 2) - prime (n + 1)
a n = b * cShow the full Challenge.lean (112 lines) — definitions included
module
public import FormalConjecturesUtil
/-!
# 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:*
- [A182126](https://oeis.org/A182126)-/
@[expose] public section
namespace OeisA182126
/-- $\mathrm{prime}(k)$ is the $k$-th prime number ($\mathrm{prime}(1) = 2$). -/
noncomputable def prime (k : ℕ) : ℕ := Nat.nth Nat.Prime (k - 1)
/-- $a(n) = \mathrm{prime}(n) \cdot \mathrm{prime}(n+1) \bmod \mathrm{prime}(n+2)$. -/
noncomputable def a (n : ℕ) : ℕ :=
if n = 0 then 0
else (prime n * prime (n + 1)) % prime (n + 2)
@[category test, AMS 11]
theorem a_1 : a 1 = 1 := by
have h0 : Nat.nth Nat.Prime 0 = 2 := (2).nth_count (by decide : (2).Prime)
have h1 : Nat.nth Nat.Prime 1 = 3 := (3).nth_count (by decide : (3).Prime)
have h2 : Nat.nth Nat.Prime 2 = 5 := (5).nth_count (by decide : (5).Prime)
show (Nat.nth Nat.Prime 0 * Nat.nth Nat.Prime 1) % Nat.nth Nat.Prime 2 = 1
rw [h0, h1, h2]
@[category test, AMS 11]
theorem a_2 : a 2 = 1 := by
have h1 : Nat.nth Nat.Prime 1 = 3 := (3).nth_count (by decide : (3).Prime)
have h2 : Nat.nth Nat.Prime 2 = 5 := (5).nth_count (by decide : (5).Prime)
have h3 : Nat.nth Nat.Prime 3 = 7 := (7).nth_count (by decide : (7).Prime)
show (Nat.nth Nat.Prime 1 * Nat.nth Nat.Prime 2) % Nat.nth Nat.Prime 3 = 1
rw [h1, h2, h3]
@[category test, AMS 11]
theorem a_3 : a 3 = 2 := by
have h2 : Nat.nth Nat.Prime 2 = 5 := (5).nth_count (by decide : (5).Prime)
have h3 : Nat.nth Nat.Prime 3 = 7 := (7).nth_count (by decide : (7).Prime)
have h4 : Nat.nth Nat.Prime 4 = 11 := (11).nth_count (by decide : (11).Prime)
show (Nat.nth Nat.Prime 2 * Nat.nth Nat.Prime 3) % Nat.nth Nat.Prime 4 = 2
rw [h2, h3, h4]
@[category test, AMS 11]
theorem a_4 : a 4 = 12 := by
have h3 : Nat.nth Nat.Prime 3 = 7 := (7).nth_count (by decide : (7).Prime)
have h4 : Nat.nth Nat.Prime 4 = 11 := (11).nth_count (by decide : (11).Prime)
have h5 : Nat.nth Nat.Prime 5 = 13 := (13).nth_count (by decide : (13).Prime)
show (Nat.nth Nat.Prime 3 * Nat.nth Nat.Prime 4) % Nat.nth Nat.Prime 5 = 12
rw [h3, h4, h5]
/-- Count of occurrences of value $v$ among $a(1), \dots, a(x)$. -/
noncomputable def countA (x v : ℕ) : ℕ :=
((Finset.range (x + 1)).filter fun n => 1 ≤ n ∧ a n = v).card
/-- $v_0$ is a most frequent value among $a(1), \dots, a(x)$. -/
def IsMostFrequent (x v₀ : ℕ) : Prop :=
∀ v : ℕ, countA x v ≤ countA x v₀
/--
Conjecture: For $x > 10^9$, the most frequent value in $a(n)$, $n=1\dots x$, has form $120k$.
-/
@[category research open, AMS 11]
theorem conjecture1 (x : ℕ) (hx : 10 ^ 9 < x) (v₀ : ℕ) (hv : IsMostFrequent x v₀) :
120 ∣ v₀ := by
sorry
/--
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
-/
@[category research open, AMS 11]
theorem conjecture2 (n : ℕ) (hn : 61 < n) :
let b := prime (n + 2) - prime n
let c := prime (n + 2) - prime (n + 1)
a n = b * c := by
sorry
/--
Are 2, 7, 11, 13, 29 the only primes in this sequence?
- _Hugo Pfoertner_, Sep 22 2025
-/
@[category research open, AMS 11]
theorem conjecture3 (n : ℕ) (hn : 0 < n) :
(a n).Prime ↔ a n ∈ ([2, 7, 11, 13, 29] : List ℕ) := by
sorry
end OeisA182126
To prove it: keep every definition of Challenge.lean unchanged and prove OeisA182126.conjecture2 with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_conjecture2 : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.
nosorry fetch oeis-182126--conjecture2 nosorry submit oeis-182126--conjecture2 nosorry/oeis-182126--conjecture2/Solution.lean --wait
Contributions
No contributions yet — be the first. Submit a proof or a finding.
Research in progress
People working on this problem share their repository and a summary of what they have tried — dead ends included. Read these before starting, build on them, and credit them in prior work when you submit.
Nobody has shared research on this problem yet.
Sign in to share your research.
Statement review
Is the formal statement faithful to the problem? Too weak, too strong, already solved in the literature? An accepted critique creates a new statement version; proofs of the previous version are re-checked and their points adjusted.
Sign in to open a critique.