{
  "id": "4422",
  "ident": "NS.04422",
  "slug": "oeis-100474",
  "title": "Conjectures associated with A100474",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "After $a(2) = 5$, is there another prime?",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question"
  ],
  "collection": "oeis",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "OeisA100474.conjecture",
  "statement_lean": "theorem conjecture : ∃ n > 2, (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# Conjectures associated with A100474\n\n$a(1) = 1$; $a(n)$ is the smallest integer such that $a(n) + a(n-1)$ has the first $n$ distinct\nprime factors not used before in this construction.\n\n*References:*\n- [A100474](https://oeis.org/A100474)\n-/\n\n@[expose] public section\n\nnamespace OeisA100474\n\n/-- The $n$-th triangular number. -/\ndef triangular (n : ℕ) : ℕ := n * (n + 1) / 2\n\n/-- The primary defining sequence `a`. -/\nnoncomputable def a : ℕ → ℕ\n  | 0 => 0\n  | 1 => 1\n  | n + 2 =>\n    (Finset.Ico (triangular (n + 1) - 1) (triangular (n + 2) - 1)).prod (Nat.nth Nat.Prime) -\n      a (n + 1)\n\n@[category API, AMS 11]\nlemma nth_prime_five : Nat.nth Nat.Prime 5 = 13 := by\n  have h1 : (13).Prime := by decide\n  exact Nat.nth_count h1\n\n@[category API, AMS 11]\nlemma nth_prime_six : Nat.nth Nat.Prime 6 = 17 := by\n  have h1 : (17).Prime := by decide\n  exact Nat.nth_count h1\n\n@[category API, AMS 11]\nlemma nth_prime_seven : Nat.nth Nat.Prime 7 = 19 := by\n  have h1 : (19).Prime := by decide\n  exact Nat.nth_count h1\n\n@[category API, AMS 11]\nlemma nth_prime_eight : Nat.nth Nat.Prime 8 = 23 := by\n  have h1 : (23).Prime := by decide\n  exact Nat.nth_count h1\n\n@[category API, AMS 11]\nlemma nth_prime_nine : Nat.nth Nat.Prime 9 = 29 := by\n  have h1 : (29).Prime := by decide\n  exact Nat.nth_count h1\n\n@[category API, AMS 11]\nlemma nth_prime_ten : Nat.nth Nat.Prime 10 = 31 := by\n  have h1 : (31).Prime := by decide\n  exact Nat.nth_count h1\n\n@[category API, AMS 11]\nlemma nth_prime_eleven : Nat.nth Nat.Prime 11 = 37 := by\n  have h1 : (37).Prime := by decide\n  exact Nat.nth_count h1\n\n@[category API, AMS 11]\nlemma nth_prime_twelve : Nat.nth Nat.Prime 12 = 41 := by\n  have h1 : (41).Prime := by decide\n  exact Nat.nth_count h1\n\n@[category API, AMS 11]\nlemma nth_prime_thirteen : Nat.nth Nat.Prime 13 = 43 := by\n  have h1 : (43).Prime := by decide\n  exact Nat.nth_count h1\n\n/-- Value of the sequence `a` at 1. -/\n@[category test, AMS 11]\ntheorem a_1 : a 1 = 1 := by rfl\n\n/-- Value of the sequence `a` at 2. -/\n@[category test, AMS 11]\ntheorem a_2 : a 2 = 5 := by\n  change (Finset.Ico 0 2).prod (Nat.nth Nat.Prime) - a 1 = 5\n  rw [Finset.prod_Ico_succ_top (by decide)]\n  rw [Finset.prod_Ico_succ_top (by decide)]\n  simp only [Finset.Ico_self, Finset.prod_empty, one_mul]\n  rw [Nat.nth_prime_zero_eq_two, Nat.nth_prime_one_eq_three]\n  rfl\n\n/-- Value of the sequence `a` at 3. -/\n@[category test, AMS 11]\ntheorem a_3 : a 3 = 380 := by\n  change (Finset.Ico 2 5).prod (Nat.nth Nat.Prime) - a 2 = 380\n  rw [a_2]\n  rw [Finset.prod_Ico_succ_top (by decide)]\n  rw [Finset.prod_Ico_succ_top (by decide)]\n  rw [Finset.prod_Ico_succ_top (by decide)]\n  simp only [Finset.Ico_self, Finset.prod_empty, one_mul]\n  rw [Nat.nth_prime_two_eq_five, Nat.nth_prime_three_eq_seven, Nat.nth_prime_four_eq_eleven]\n  rfl\n\n/-- Value of the sequence `a` at 4. -/\n@[category test, AMS 11]\ntheorem a_4 : a 4 = 96197 := by\n  change (Finset.Ico 5 9).prod (Nat.nth Nat.Prime) - a 3 = 96197\n  rw [a_3]\n  rw [Finset.prod_Ico_succ_top (by decide)]\n  rw [Finset.prod_Ico_succ_top (by decide)]\n  rw [Finset.prod_Ico_succ_top (by decide)]\n  rw [Finset.prod_Ico_succ_top (by decide)]\n  simp only [Finset.Ico_self, Finset.prod_empty, one_mul]\n  rw [nth_prime_five, nth_prime_six, nth_prime_seven, nth_prime_eight]\n  rfl\n\n/-- Value of the sequence `a` at 5. -/\n@[category test, AMS 11]\ntheorem a_5 : a 5 = 58546472 := by\n  change (Finset.Ico 9 14).prod (Nat.nth Nat.Prime) - a 4 = 58546472\n  rw [a_4]\n  rw [Finset.prod_Ico_succ_top (by decide)]\n  rw [Finset.prod_Ico_succ_top (by decide)]\n  rw [Finset.prod_Ico_succ_top (by decide)]\n  rw [Finset.prod_Ico_succ_top (by decide)]\n  rw [Finset.prod_Ico_succ_top (by decide)]\n  simp only [Finset.Ico_self, Finset.prod_empty, one_mul]\n  rw [nth_prime_nine, nth_prime_ten, nth_prime_eleven, nth_prime_twelve, nth_prime_thirteen]\n  rfl\n\n/--\nAfter $a(2) = 5$, is there another prime?\n-/\n@[category research open, question, AMS 11]\ntheorem conjecture : ∃ n > 2, (a n).Prime := by\n  sorry\n\ndef next_semiprime.answer : ℕ :=\n  3852669607062814427999374038085094563026983841699038416757537720951140990693348082633155462564082456461927363575765861495986901576629\n\nset_option linter.style.formal_proof_palomar false in\n/--\nWhat is the next semiprime in the sequence after $a(11)$?\n-/\n@[category research solved, question value, AMS 11,\n  formal_proof using lean4 at\n    \"https://github.com/KitaKen1/oeis-a100474-next-semiprime/blob/d7781751918e63fd1268b15525bf9554c92fdd4d/lean/OeisA100474NextSemiprimeFC.lean#L1285-L1288\"]\ntheorem next_semiprime :\n    next_semiprime.answer =\n      a (sInf {n : ℕ | 11 < n ∧ (a n).IsSemiprime}) := by\n  sorry\n\nend OeisA100474\n",
  "statement_hash": "b9d21529f93f1a408d4fd08833074af3f77a43b3815b8faf4022a8c9626cda01",
  "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."
}