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

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Infinitude of primorial primes

Source:Wikipedia lists of open problems
Open problem Nobody knows the answer yet — neither on paper nor in Lean. First verified proof: +100 points.
Statement:reviewed
Statement:

Do infinitely many primorial primes pn#±1p_n\# \pm 1 exist? (The positive-sign case pn#+1p_n\# + 1 appears as EuclidNumbers.infinite_prime_euclid_numbers.)

Subjects:Number Theory (math.NT)
MSC classes:11
Tags:question
Cite as:NS.08320 [math.NT] · NS.08320v1 for this version
Declaration:PrimorialPrime.infinitely_many_primorial_primes
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 100, later ones: 10; accepted critique: up to 60
Statement hash:786dfc192425a0d5e55c742cbbe524296cc0a6de20c049f44201503b0d55eb54
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/Wikipedia/PrimorialPrime.lean

Formal statement

theorem infinitely_many_primorial_primes :
    {q : ℕ | IsPrimorialPrime q}.Infinite
Show the full Challenge.lean (152 lines) — definitions included
module

public import FormalConjectures.Wikipedia.Euclid
public import FormalConjecturesUtil

/-!
# Infinitude of primorial primes

For $n \in \mathbb{N}$, let $p_n\#$ (`Nat.kthPrimorial n`) denote the primorial multiplying the
initial $n$ primes (with $p_0\# = 1$), so `EuclidNumbers.Euclid n` equals $p_n\# + 1$ and
$p_n\# - 1$ is a *Kummer number* (`OEIS A057588`). Primes equal to $p_n\# + 1$ (prime Euclid
numbers, `OEIS A018239`) or $p_n\# - 1$ (prime Kummer numbers, `OEIS A057705`) are called
*primorial primes* (`OEIS A228486`, studied computationally by Dubner 1987). Although $p_n\# + 1$
always has a prime factor exceeding $p_n$, the integers $p_n\# \pm 1$ are often composite
(beginning with $p_4\# - 1 = 209 = 11 \times 19$ and $p_6\# + 1 = 30031 = 59 \times 509$). Whether
infinitely many primorial primes exist, whether infinitely many Kummer numbers are prime, and
whether infinitely many integers $p_n\# \pm 1$ (or of either sign individually) are composite all
remain open.

*References:*
- [Wikipedia: Primorial prime](https://en.wikipedia.org/wiki/Primorial_prime)
- [Wikipedia: Euclid number](https://en.wikipedia.org/wiki/Euclid_number#Unsolved_problems)
- [OEIS A228486](https://oeis.org/A228486)
- [OEIS A018239](https://oeis.org/A018239)
- [OEIS A057705](https://oeis.org/A057705)
- H. Dubner, *Factorial and primorial primes*, J. Recreational Math. **19** (1987), no. 3,
  197–203.
-/

@[expose] public section

namespace PrimorialPrime

/-- `EuclidNumbers.Euclid n` agrees with `Nat.kthPrimorial n + 1`. -/
@[simp, category API, AMS 11]
theorem euclid_eq_kthPrimorial_add_one (n : ℕ) :
    EuclidNumbers.Euclid n = Nat.kthPrimorial n + 1 :=
  Nat.add_comm 1 _

/-- A prime Euclid number, i.e., a prime equal to `EuclidNumbers.Euclid n` ($p_n\# + 1$) for some
$n \in \mathbb{N}$ (including $E_0 = p_0\# + 1 = 2$). -/
def IsEuclidPrimorialPrime (q : ℕ) : Prop :=
  q.Prime ∧ ∃ n : ℕ, q = EuclidNumbers.Euclid n

/-- A prime Kummer number, i.e., a prime equal to $p_n\# - 1$ for some $n \in \mathbb{N}$. -/
def IsKummerPrimorialPrime (q : ℕ) : Prop :=
  q.Prime ∧ ∃ n : ℕ, q + 1 = Nat.kthPrimorial n

/-- A prime equal to $p_n\# \pm 1$ for some $n \in \mathbb{N}$. -/
def IsPrimorialPrime (q : ℕ) : Prop :=
  IsEuclidPrimorialPrime q ∨ IsKummerPrimorialPrime q

/-- Verifies $2 = p_0\# + 1$, $3 = p_1\# + 1$, and $31 = p_3\# + 1$ as prime Euclid numbers,
and $5 = p_2\# - 1$ and $29 = p_3\# - 1$ as prime Kummer numbers. -/
@[category test, AMS 11]
theorem primorialPrime_small_witnesses :
    IsEuclidPrimorialPrime 2 ∧ IsEuclidPrimorialPrime 3 ∧ IsEuclidPrimorialPrime 31 ∧
      IsKummerPrimorialPrime 5 ∧ IsPrimorialPrime 29 := by
  refine ⟨⟨by decide, 0, by simp⟩, ⟨by decide, 1, by simp⟩, ⟨by decide, 3, by simp⟩,
    ⟨by decide, 2, by simp⟩, Or.inr ⟨by decide, 3, by simp⟩⟩

/-- Checks that $p_4\# - 1 = 209 = 11 \times 19$ and $E_6 = p_6\# + 1 = 30031 = 59 \times 509$ are
composite, hence not primorial primes. -/
@[category test, AMS 11]
theorem not_primorialPrime_counterexamples :
    ¬ IsPrimorialPrime (Nat.kthPrimorial 4 - 1) ∧ ¬ (EuclidNumbers.Euclid 6).Prime := by
  have h4 : Nat.kthPrimorial 4 = 210 := Nat.kthPrimorial_four
  have h6 : Nat.kthPrimorial 6 = 30030 := by
    rw [Nat.kthPrimorial_succ, Nat.kthPrimorial_five, Nat.nth_prime_five_eq_thirteen]
  rw [euclid_eq_kthPrimorial_add_one, h4, h6]
  refine ⟨?_, by norm_num⟩
  rintro (⟨hp, _⟩ | ⟨hp, _⟩) <;> norm_num at hp

/-- Every primorial prime is prime, and infinitude of either prime Euclid numbers
(`EuclidNumbers.infinite_prime_euclid_numbers`) or prime Kummer numbers implies infinitude of
`IsPrimorialPrime`. -/
@[category API, AMS 11]
theorem isPrimorialPrime_prime_and_infinite_imp :
    (∀ q : ℕ, IsPrimorialPrime q → q.Prime) ∧
      (type_of% EuclidNumbers.infinite_prime_euclid_numbers →
        {q : ℕ | IsPrimorialPrime q}.Infinite) ∧
      ({q : ℕ | IsKummerPrimorialPrime q}.Infinite → {q : ℕ | IsPrimorialPrime q}.Infinite) := by
  have hmono : StrictMono EuclidNumbers.Euclid := by
    refine strictMono_nat_of_lt_succ fun k => ?_
    have hpos : 0 < Nat.kthPrimorial k :=
      Finset.prod_pos fun i _ => (Nat.prime_nth_prime i).pos
    have hp2 : 2 ≤ Nat.nth Nat.Prime k := (Nat.prime_nth_prime k).two_le
    rw [euclid_eq_kthPrimorial_add_one, euclid_eq_kthPrimorial_add_one, Nat.kthPrimorial_succ]
    nlinarith
  refine ⟨?_, fun h => (h.image hmono.injective.injOn).mono ?_,
    fun h => h.mono fun _ hq => Or.inr hq⟩
  · rintro q (⟨hq, _⟩ | ⟨hq, _⟩) <;> exact hq
  · rintro q ⟨n, hn, rfl⟩
    exact Or.inl ⟨hn, n, rfl⟩

/-- Verifies $7 = p_2\# + 1$ and $211 = p_4\# + 1$ as prime Euclid numbers, and
$2309 = p_5\# - 1$ as a prime Kummer number. -/
@[category test, AMS 11]
theorem primorialPrime_7_211_2309 :
    IsEuclidPrimorialPrime 7 ∧ IsEuclidPrimorialPrime 211 ∧ IsKummerPrimorialPrime 2309 := by
  refine ⟨⟨by decide, 2, by simp⟩, ⟨by norm_num, 4, by simp⟩, ⟨by norm_num, 5, by simp⟩⟩

/-- Do infinitely many primorial primes $p_n\# \pm 1$ exist? (The positive-sign case $p_n\# + 1$
appears as `EuclidNumbers.infinite_prime_euclid_numbers`.) -/
@[category research open, question, AMS 11]
theorem infinitely_many_primorial_primes :
    {q : ℕ | IsPrimorialPrime q}.Infinite := by
  sorry

/-- Do infinitely many prime Kummer numbers $p_n\# - 1$ exist? -/
@[category research open, question, AMS 11]
theorem infinitely_many_primorial_primes.variants.kummer :
    {q : ℕ | IsKummerPrimorialPrime q}.Infinite := by
  sorry

/-- Are infinitely many integers of the form $p_n\# \pm 1$ composite? This statement takes the
union over both signs ($m = p_n\# + 1$ or $m = p_n\# - 1$). -/
@[category research open, question, AMS 11]
theorem infinitely_many_primorial_primes.variants.composite :
    {m : ℕ | m.Composite ∧
      ∃ n : ℕ, m = EuclidNumbers.Euclid n ∨ m + 1 = Nat.kthPrimorial n}.Infinite := by
  sorry

/-- Are infinitely many Euclid numbers $p_n\# + 1$ composite? -/
@[category research open, question, AMS 11]
theorem infinitely_many_primorial_primes.variants.composite_euclid :
    {n : ℕ | (EuclidNumbers.Euclid n).Composite}.Infinite := by
  sorry

/-- Are infinitely many Kummer numbers $p_n\# - 1$ composite? -/
@[category research open, question, AMS 11]
theorem infinitely_many_primorial_primes.variants.composite_kummer :
    {m : ℕ | m.Composite ∧ ∃ n : ℕ, m + 1 = Nat.kthPrimorial n}.Infinite := by
  sorry

end PrimorialPrime

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

nosorry fetch wikipedia-primorialprime
nosorry submit wikipedia-primorialprime nosorry/wikipedia-primorialprime/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.