{
  "id": "5253",
  "ident": "NS.05253",
  "slug": "oeis-210186",
  "title": "Least integer $m > 1$ dividing no sum of two distinct primorials up to $P_n$",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "\"Conjecture: all the terms are primes.\"\n- _Zhi-Wei Sun_, Mar 18 2012",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [],
  "collection": "oeis",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "OeisA210186.conjecture_1",
  "statement_lean": "theorem conjecture_1 (n : ℕ) (hn : 1 ≤ n) : (a n).Prime",
  "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 FormalConjecturesUtil\n\n/-!\n# Least integer $m > 1$ dividing no sum of two distinct primorials up to $P_n$\n\nFor $n \\ge 1$, $a(n)$ is the least integer $m > 1$ such that $m$ divides none of $P_i + P_j$ with\n$0 < i < j \\le n$, where $P_k$ is the product of the first $k$ primes.\n\n*References:*\n- [A210186](https://oeis.org/A210186)\n-/\n\n@[expose] public section\n\nnamespace OeisA210186\n\n/-- Least integer $m > 1$ such that $m$ divides none of $P_i + P_j$ with $0 < i < j \\le n$,\nwhere $P_k$ is the $k$-th primorial `Nat.kthPrimorial k`. -/\nnoncomputable def a (n : ℕ) : ℕ :=\n  sInf { m : ℕ | 1 < m ∧\n    ∀ i j : ℕ, 1 ≤ i → i < j → j ≤ n → ¬ (m ∣ (Nat.kthPrimorial i + Nat.kthPrimorial j)) }\n\n@[category test, AMS 11]\ntheorem a_1 : a 1 = 2 := by\n  apply IsLeast.csInf_eq\n  refine ⟨⟨by decide, fun i j hi hij hj => by omega⟩, fun m hm => hm.1⟩\n\n@[category test, AMS 11]\ntheorem a_2 : a 2 = 3 := by\n  apply IsLeast.csInf_eq\n  refine ⟨⟨by decide, fun i j hi hij hj => ?_⟩, fun m hm => ?_⟩\n  · have hi1 : i = 1 := by omega\n    have hj2 : j = 2 := by omega\n    subst hi1 hj2\n    simp\n  · by_contra! hlt\n    have hm2 : m = 2 := by have := hm.1; omega\n    subst hm2\n    have := hm.2 1 2 (by decide) (by decide) (by decide)\n    simp at this\n\n@[category test, AMS 11]\ntheorem a_3 : a 3 = 5 := by\n  apply IsLeast.csInf_eq\n  refine ⟨⟨by decide, fun i j hi hij hj => ?_⟩, fun m hm => ?_⟩\n  · have hj_ge : 2 ≤ j := by omega\n    interval_cases j\n    · have hi1 : i = 1 := by omega\n      subst hi1; simp\n    · interval_cases i <;> simp\n  · by_contra! hlt\n    have hm_gt : 1 < m := hm.1\n    interval_cases m\n    · have := hm.2 1 2 (by decide) (by decide) (by decide); simp at this\n    · have := hm.2 2 3 (by decide) (by decide) (by decide); simp at this\n    · have := hm.2 1 2 (by decide) (by decide) (by decide); simp at this\n\n@[category test, AMS 11]\ntheorem a_4 : a 4 = 7 := by\n  apply IsLeast.csInf_eq\n  refine ⟨⟨by decide, fun i j hi hij hj => ?_⟩, fun m hm => ?_⟩\n  · have hj_ge : 2 ≤ j := by omega\n    interval_cases j\n    · have hi1 : i = 1 := by omega\n      subst hi1; simp\n    · interval_cases i <;> simp\n    · interval_cases i <;> simp\n  · by_contra! hlt\n    have hm_gt : 1 < m := hm.1\n    interval_cases m\n    · have := hm.2 1 2 (by decide) (by decide) (by decide); simp at this\n    · have := hm.2 2 3 (by decide) (by decide) (by decide); simp at this\n    · have := hm.2 1 2 (by decide) (by decide) (by decide); simp at this\n    · have := hm.2 3 4 (by decide) (by decide) (by decide); simp at this\n    · have := hm.2 2 3 (by decide) (by decide) (by decide); simp at this\n\n@[category test, AMS 11]\ntheorem a_5 : a 5 = 11 := by\n  apply IsLeast.csInf_eq\n  refine ⟨⟨by decide, fun i j hi hij hj => ?_⟩, fun m hm => ?_⟩\n  · have hj_ge : 2 ≤ j := by omega\n    interval_cases j\n    · have hi1 : i = 1 := by omega\n      subst hi1; simp\n    · interval_cases i <;> simp\n    · interval_cases i <;> simp\n    · interval_cases i <;> simp\n  · by_contra! hlt\n    have hm_gt : 1 < m := hm.1\n    interval_cases m\n    · have := hm.2 1 2 (by decide) (by decide) (by decide); simp at this\n    · have := hm.2 2 3 (by decide) (by decide) (by decide); simp at this\n    · have := hm.2 1 2 (by decide) (by decide) (by decide); simp at this\n    · have := hm.2 3 4 (by decide) (by decide) (by decide); simp at this\n    · have := hm.2 2 3 (by decide) (by decide) (by decide); simp at this\n    · have := hm.2 4 5 (by decide) (by decide) (by decide); simp at this\n    · have := hm.2 1 2 (by decide) (by decide) (by decide); simp at this\n    · have := hm.2 2 3 (by decide) (by decide) (by decide); simp at this\n    · have := hm.2 3 4 (by decide) (by decide) (by decide); simp at this\n\n/--\n\"Conjecture: all the terms are primes.\"\n- _Zhi-Wei Sun_, Mar 18 2012\n-/\n@[category research open, AMS 11]\ntheorem conjecture_1 (n : ℕ) (hn : 1 ≤ n) : (a n).Prime := by\n  sorry\n\n/--\n\"Conjecture: $a(n) < n^2$ for all $n > 1$.\"\n- _Zhi-Wei Sun_, Mar 18 2012\n-/\n@[category research open, AMS 11]\ntheorem conjecture_2 (n : ℕ) (hn : 1 < n) : a n < n ^ 2 := by\n  sorry\n\nend OeisA210186\n",
  "statement_hash": "50661f25c8539172ce3401e06f2881c7c9d60a3d4a8847deaf203ad62885a618",
  "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."
}