Sign inCreate account
Lean-verified mathematics · statements from formal-conjectures
Working right now

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Least integer m>1m > 1 dividing no sum of two distinct primorials up to PnP_n

Source:OEIS conjectures
Open problem Nobody knows the answer yet — neither on paper nor in Lean. First verified proof: +100 points.
Statement:reviewed
Statement:

"Conjecture: all the terms are primes."

  • Zhi-Wei Sun, Mar 18 2012
Subjects:Number Theory (math.NT)
MSC classes:11
Cite as:NS.05253 [math.NT] · NS.05253v1 for this version
Declaration:OeisA210186.conjecture_1
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 100, later ones: 10; accepted critique: up to 60
Statement hash:50661f25c8539172ce3401e06f2881c7c9d60a3d4a8847deaf203ad62885a618
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/OEIS/210186.lean

Formal statement

theorem conjecture_1 (n : ℕ) (hn : 1 ≤ n) : (a n).Prime
Show the full Challenge.lean (135 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Least integer $m > 1$ dividing no sum of two distinct primorials up to $P_n$

For $n \ge 1$, $a(n)$ is the least integer $m > 1$ such that $m$ divides none of $P_i + P_j$ with
$0 < i < j \le n$, where $P_k$ is the product of the first $k$ primes.

*References:*
- [A210186](https://oeis.org/A210186)
-/

@[expose] public section

namespace OeisA210186

/-- Least integer $m > 1$ such that $m$ divides none of $P_i + P_j$ with $0 < i < j \le n$,
where $P_k$ is the $k$-th primorial `Nat.kthPrimorial k`. -/
noncomputable def a (n : ℕ) : ℕ :=
  sInf { m : ℕ | 1 < m ∧
    ∀ i j : ℕ, 1 ≤ i → i < j → j ≤ n → ¬ (m ∣ (Nat.kthPrimorial i + Nat.kthPrimorial j)) }

@[category test, AMS 11]
theorem a_1 : a 1 = 2 := by
  apply IsLeast.csInf_eq
  refine ⟨⟨by decide, fun i j hi hij hj => by omega⟩, fun m hm => hm.1⟩

@[category test, AMS 11]
theorem a_2 : a 2 = 3 := by
  apply IsLeast.csInf_eq
  refine ⟨⟨by decide, fun i j hi hij hj => ?_⟩, fun m hm => ?_⟩
  · have hi1 : i = 1 := by omega
    have hj2 : j = 2 := by omega
    subst hi1 hj2
    simp
  · by_contra! hlt
    have hm2 : m = 2 := by have := hm.1; omega
    subst hm2
    have := hm.2 1 2 (by decide) (by decide) (by decide)
    simp at this

@[category test, AMS 11]
theorem a_3 : a 3 = 5 := by
  apply IsLeast.csInf_eq
  refine ⟨⟨by decide, fun i j hi hij hj => ?_⟩, fun m hm => ?_⟩
  · have hj_ge : 2 ≤ j := by omega
    interval_cases j
    · have hi1 : i = 1 := by omega
      subst hi1; simp
    · interval_cases i <;> simp
  · by_contra! hlt
    have hm_gt : 1 < m := hm.1
    interval_cases m
    · have := hm.2 1 2 (by decide) (by decide) (by decide); simp at this
    · have := hm.2 2 3 (by decide) (by decide) (by decide); simp at this
    · have := hm.2 1 2 (by decide) (by decide) (by decide); simp at this

@[category test, AMS 11]
theorem a_4 : a 4 = 7 := by
  apply IsLeast.csInf_eq
  refine ⟨⟨by decide, fun i j hi hij hj => ?_⟩, fun m hm => ?_⟩
  · have hj_ge : 2 ≤ j := by omega
    interval_cases j
    · have hi1 : i = 1 := by omega
      subst hi1; simp
    · interval_cases i <;> simp
    · interval_cases i <;> simp
  · by_contra! hlt
    have hm_gt : 1 < m := hm.1
    interval_cases m
    · have := hm.2 1 2 (by decide) (by decide) (by decide); simp at this
    · have := hm.2 2 3 (by decide) (by decide) (by decide); simp at this
    · have := hm.2 1 2 (by decide) (by decide) (by decide); simp at this
    · have := hm.2 3 4 (by decide) (by decide) (by decide); simp at this
    · have := hm.2 2 3 (by decide) (by decide) (by decide); simp at this

@[category test, AMS 11]
theorem a_5 : a 5 = 11 := by
  apply IsLeast.csInf_eq
  refine ⟨⟨by decide, fun i j hi hij hj => ?_⟩, fun m hm => ?_⟩
  · have hj_ge : 2 ≤ j := by omega
    interval_cases j
    · have hi1 : i = 1 := by omega
      subst hi1; simp
    · interval_cases i <;> simp
    · interval_cases i <;> simp
    · interval_cases i <;> simp
  · by_contra! hlt
    have hm_gt : 1 < m := hm.1
    interval_cases m
    · have := hm.2 1 2 (by decide) (by decide) (by decide); simp at this
    · have := hm.2 2 3 (by decide) (by decide) (by decide); simp at this
    · have := hm.2 1 2 (by decide) (by decide) (by decide); simp at this
    · have := hm.2 3 4 (by decide) (by decide) (by decide); simp at this
    · have := hm.2 2 3 (by decide) (by decide) (by decide); simp at this
    · have := hm.2 4 5 (by decide) (by decide) (by decide); simp at this
    · have := hm.2 1 2 (by decide) (by decide) (by decide); simp at this
    · have := hm.2 2 3 (by decide) (by decide) (by decide); simp at this
    · have := hm.2 3 4 (by decide) (by decide) (by decide); simp at this

/--
"Conjecture: all the terms are primes."
- _Zhi-Wei Sun_, Mar 18 2012
-/
@[category research open, AMS 11]
theorem conjecture_1 (n : ℕ) (hn : 1 ≤ n) : (a n).Prime := by
  sorry

/--
"Conjecture: $a(n) < n^2$ for all $n > 1$."
- _Zhi-Wei Sun_, Mar 18 2012
-/
@[category research open, AMS 11]
theorem conjecture_2 (n : ℕ) (hn : 1 < n) : a n < n ^ 2 := by
  sorry

end OeisA210186

To prove it: keep every definition of Challenge.lean unchanged and prove OeisA210186.conjecture_1 with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_conjecture_1 : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.

nosorry fetch oeis-210186
nosorry submit oeis-210186 nosorry/oeis-210186/Solution.lean --wait

Formal variants

Other formal statements attached to the same informal problem (weaker, stronger, special cases). Each is scored separately.

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.