{
  "id": "8320",
  "ident": "NS.08320",
  "slug": "wikipedia-primorialprime",
  "title": "Infinitude of primorial primes",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "Do infinitely many primorial primes $p_n\\# \\pm 1$ exist? (The positive-sign case $p_n\\# + 1$\nappears as `EuclidNumbers.infinite_prime_euclid_numbers`.)",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question"
  ],
  "collection": "wikipedia",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "PrimorialPrime.infinitely_many_primorial_primes",
  "statement_lean": "theorem infinitely_many_primorial_primes :\n    {q : ℕ | IsPrimorialPrime q}.Infinite",
  "challenge_source": "/-\nCopyright 2026 The Formal Conjectures Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-/\nmodule\n\npublic import FormalConjectures.Wikipedia.Euclid\npublic import FormalConjecturesUtil\n\n/-!\n# Infinitude of primorial primes\n\nFor $n \\in \\mathbb{N}$, let $p_n\\#$ (`Nat.kthPrimorial n`) denote the primorial multiplying the\ninitial $n$ primes (with $p_0\\# = 1$), so `EuclidNumbers.Euclid n` equals $p_n\\# + 1$ and\n$p_n\\# - 1$ is a *Kummer number* (`OEIS A057588`). Primes equal to $p_n\\# + 1$ (prime Euclid\nnumbers, `OEIS A018239`) or $p_n\\# - 1$ (prime Kummer numbers, `OEIS A057705`) are called\n*primorial primes* (`OEIS A228486`, studied computationally by Dubner 1987). Although $p_n\\# + 1$\nalways has a prime factor exceeding $p_n$, the integers $p_n\\# \\pm 1$ are often composite\n(beginning with $p_4\\# - 1 = 209 = 11 \\times 19$ and $p_6\\# + 1 = 30031 = 59 \\times 509$). Whether\ninfinitely many primorial primes exist, whether infinitely many Kummer numbers are prime, and\nwhether infinitely many integers $p_n\\# \\pm 1$ (or of either sign individually) are composite all\nremain open.\n\n*References:*\n- [Wikipedia: Primorial prime](https://en.wikipedia.org/wiki/Primorial_prime)\n- [Wikipedia: Euclid number](https://en.wikipedia.org/wiki/Euclid_number#Unsolved_problems)\n- [OEIS A228486](https://oeis.org/A228486)\n- [OEIS A018239](https://oeis.org/A018239)\n- [OEIS A057705](https://oeis.org/A057705)\n- H. Dubner, *Factorial and primorial primes*, J. Recreational Math. **19** (1987), no. 3,\n  197–203.\n-/\n\n@[expose] public section\n\nnamespace PrimorialPrime\n\n/-- `EuclidNumbers.Euclid n` agrees with `Nat.kthPrimorial n + 1`. -/\n@[simp, category API, AMS 11]\ntheorem euclid_eq_kthPrimorial_add_one (n : ℕ) :\n    EuclidNumbers.Euclid n = Nat.kthPrimorial n + 1 :=\n  Nat.add_comm 1 _\n\n/-- A prime Euclid number, i.e., a prime equal to `EuclidNumbers.Euclid n` ($p_n\\# + 1$) for some\n$n \\in \\mathbb{N}$ (including $E_0 = p_0\\# + 1 = 2$). -/\ndef IsEuclidPrimorialPrime (q : ℕ) : Prop :=\n  q.Prime ∧ ∃ n : ℕ, q = EuclidNumbers.Euclid n\n\n/-- A prime Kummer number, i.e., a prime equal to $p_n\\# - 1$ for some $n \\in \\mathbb{N}$. -/\ndef IsKummerPrimorialPrime (q : ℕ) : Prop :=\n  q.Prime ∧ ∃ n : ℕ, q + 1 = Nat.kthPrimorial n\n\n/-- A prime equal to $p_n\\# \\pm 1$ for some $n \\in \\mathbb{N}$. -/\ndef IsPrimorialPrime (q : ℕ) : Prop :=\n  IsEuclidPrimorialPrime q ∨ IsKummerPrimorialPrime q\n\n/-- Verifies $2 = p_0\\# + 1$, $3 = p_1\\# + 1$, and $31 = p_3\\# + 1$ as prime Euclid numbers,\nand $5 = p_2\\# - 1$ and $29 = p_3\\# - 1$ as prime Kummer numbers. -/\n@[category test, AMS 11]\ntheorem primorialPrime_small_witnesses :\n    IsEuclidPrimorialPrime 2 ∧ IsEuclidPrimorialPrime 3 ∧ IsEuclidPrimorialPrime 31 ∧\n      IsKummerPrimorialPrime 5 ∧ IsPrimorialPrime 29 := by\n  refine ⟨⟨by decide, 0, by simp⟩, ⟨by decide, 1, by simp⟩, ⟨by decide, 3, by simp⟩,\n    ⟨by decide, 2, by simp⟩, Or.inr ⟨by decide, 3, by simp⟩⟩\n\n/-- Checks that $p_4\\# - 1 = 209 = 11 \\times 19$ and $E_6 = p_6\\# + 1 = 30031 = 59 \\times 509$ are\ncomposite, hence not primorial primes. -/\n@[category test, AMS 11]\ntheorem not_primorialPrime_counterexamples :\n    ¬ IsPrimorialPrime (Nat.kthPrimorial 4 - 1) ∧ ¬ (EuclidNumbers.Euclid 6).Prime := by\n  have h4 : Nat.kthPrimorial 4 = 210 := Nat.kthPrimorial_four\n  have h6 : Nat.kthPrimorial 6 = 30030 := by\n    rw [Nat.kthPrimorial_succ, Nat.kthPrimorial_five, Nat.nth_prime_five_eq_thirteen]\n  rw [euclid_eq_kthPrimorial_add_one, h4, h6]\n  refine ⟨?_, by norm_num⟩\n  rintro (⟨hp, _⟩ | ⟨hp, _⟩) <;> norm_num at hp\n\n/-- Every primorial prime is prime, and infinitude of either prime Euclid numbers\n(`EuclidNumbers.infinite_prime_euclid_numbers`) or prime Kummer numbers implies infinitude of\n`IsPrimorialPrime`. -/\n@[category API, AMS 11]\ntheorem isPrimorialPrime_prime_and_infinite_imp :\n    (∀ q : ℕ, IsPrimorialPrime q → q.Prime) ∧\n      (type_of% EuclidNumbers.infinite_prime_euclid_numbers →\n        {q : ℕ | IsPrimorialPrime q}.Infinite) ∧\n      ({q : ℕ | IsKummerPrimorialPrime q}.Infinite → {q : ℕ | IsPrimorialPrime q}.Infinite) := by\n  have hmono : StrictMono EuclidNumbers.Euclid := by\n    refine strictMono_nat_of_lt_succ fun k => ?_\n    have hpos : 0 < Nat.kthPrimorial k :=\n      Finset.prod_pos fun i _ => (Nat.prime_nth_prime i).pos\n    have hp2 : 2 ≤ Nat.nth Nat.Prime k := (Nat.prime_nth_prime k).two_le\n    rw [euclid_eq_kthPrimorial_add_one, euclid_eq_kthPrimorial_add_one, Nat.kthPrimorial_succ]\n    nlinarith\n  refine ⟨?_, fun h => (h.image hmono.injective.injOn).mono ?_,\n    fun h => h.mono fun _ hq => Or.inr hq⟩\n  · rintro q (⟨hq, _⟩ | ⟨hq, _⟩) <;> exact hq\n  · rintro q ⟨n, hn, rfl⟩\n    exact Or.inl ⟨hn, n, rfl⟩\n\n/-- Verifies $7 = p_2\\# + 1$ and $211 = p_4\\# + 1$ as prime Euclid numbers, and\n$2309 = p_5\\# - 1$ as a prime Kummer number. -/\n@[category test, AMS 11]\ntheorem primorialPrime_7_211_2309 :\n    IsEuclidPrimorialPrime 7 ∧ IsEuclidPrimorialPrime 211 ∧ IsKummerPrimorialPrime 2309 := by\n  refine ⟨⟨by decide, 2, by simp⟩, ⟨by norm_num, 4, by simp⟩, ⟨by norm_num, 5, by simp⟩⟩\n\n/-- Do infinitely many primorial primes $p_n\\# \\pm 1$ exist? (The positive-sign case $p_n\\# + 1$\nappears as `EuclidNumbers.infinite_prime_euclid_numbers`.) -/\n@[category research open, question, AMS 11]\ntheorem infinitely_many_primorial_primes :\n    {q : ℕ | IsPrimorialPrime q}.Infinite := by\n  sorry\n\n/-- Do infinitely many prime Kummer numbers $p_n\\# - 1$ exist? -/\n@[category research open, question, AMS 11]\ntheorem infinitely_many_primorial_primes.variants.kummer :\n    {q : ℕ | IsKummerPrimorialPrime q}.Infinite := by\n  sorry\n\n/-- Are infinitely many integers of the form $p_n\\# \\pm 1$ composite? This statement takes the\nunion over both signs ($m = p_n\\# + 1$ or $m = p_n\\# - 1$). -/\n@[category research open, question, AMS 11]\ntheorem infinitely_many_primorial_primes.variants.composite :\n    {m : ℕ | m.Composite ∧\n      ∃ n : ℕ, m = EuclidNumbers.Euclid n ∨ m + 1 = Nat.kthPrimorial n}.Infinite := by\n  sorry\n\n/-- Are infinitely many Euclid numbers $p_n\\# + 1$ composite? -/\n@[category research open, question, AMS 11]\ntheorem infinitely_many_primorial_primes.variants.composite_euclid :\n    {n : ℕ | (EuclidNumbers.Euclid n).Composite}.Infinite := by\n  sorry\n\n/-- Are infinitely many Kummer numbers $p_n\\# - 1$ composite? -/\n@[category research open, question, AMS 11]\ntheorem infinitely_many_primorial_primes.variants.composite_kummer :\n    {m : ℕ | m.Composite ∧ ∃ n : ℕ, m + 1 = Nat.kthPrimorial n}.Infinite := by\n  sorry\n\nend PrimorialPrime\n",
  "statement_hash": "786dfc192425a0d5e55c742cbbe524296cc0a6de20c049f44201503b0d55eb54",
  "toolchain": "leanprover/lean4:v4.33.1",
  "upstream_commit": "f9b3868d5ca994a7bf95039bcec05338c0c21e2f",
  "workspace": "formal-conjectures",
  "field": "math",
  "formalization": "formal",
  "verification": "lean-kernel",
  "license": "Apache-2.0",
  "attribution": "google-deepmind/formal-conjectures contributors",
  "metric_name": null,
  "metric_direction": null,
  "critiques": [],
  "public_partial_proofs": [],
  "research_threads": [],
  "instructions": "Read research_threads first: other people's public repositories and what they already tried. Write Solution.lean starting from challenge_source. Keep every definition identical, prove decl_name with exactly the same type, no sorry in its dependency closure, no new axioms, no native_decide, no metaprogramming. Submit with POST /api/v1/submissions."
}