{
  "id": "5347",
  "ident": "NS.05347",
  "slug": "oeis-217785",
  "title": "Smallest integer $s > n$ such that $1 + 2s + 3s^2 + \\dots + n s^{n-1}$ is prime",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "Conjecture: For each $n \\ge 2$, there are infinitely many primes of the form\n$1 + 2s + \\dots + n s^{n-1}$ where $s$ is a positive integer.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [],
  "collection": "oeis",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "OeisA217785.conjecture_1",
  "statement_lean": "theorem conjecture_1 (n : ℕ) (hn : 2 ≤ n) :\n    {s : ℕ | 0 < s ∧ Nat.Prime (polyP n s)}.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 FormalConjecturesUtil\n\n/-!\n# Smallest integer $s > n$ such that $1 + 2s + 3s^2 + \\dots + n s^{n-1}$ is prime\n\nFor $n \\ge 2$, $a(n)$ is the smallest integer $s > n$ such that the sum\n$P_n(s) = \\sum_{k=0}^{n-1} (k+1) s^k$ is a prime number.\n\n*References:*\n- [A217785](https://oeis.org/A217785)\n-/\n\n@[expose] public section\n\nnamespace OeisA217785\n\n/-- `polyP n s` is the sum $\\sum_{k=0}^{n-1} (k+1) s^k$. -/\ndef polyP (n s : ℕ) : ℕ :=\n  ∑ k ∈ Finset.range n, (k + 1) * s ^ k\n\nopen scoped Classical in\n/-- Smallest integer $s > n$ such that `polyP n s` is prime,\nor `none` if no such $s$ exists. -/\nnoncomputable def a (n : ℕ) : Option ℕ :=\n  if ∃ s : ℕ, n < s ∧ Nat.Prime (polyP n s) then\n    some (sInf {s : ℕ | n < s ∧ Nat.Prime (polyP n s)})\n  else\n    none\n\n@[category test, AMS 11]\ntheorem a_2 : a 2 = some 3 := by\n  have h : IsLeast {s : ℕ | 2 < s ∧ Nat.Prime (polyP 2 s)} 3 := by\n    refine ⟨by norm_num [polyP], fun x hx => ?_⟩\n    by_contra! h\n    interval_cases x <;> norm_num [polyP] at hx\n  have h_ex : ∃ s : ℕ, 2 < s ∧ Nat.Prime (polyP 2 s) := ⟨3, h.1⟩\n  rw [a, if_pos h_ex, h.csInf_eq]\n\n@[category test, AMS 11]\ntheorem a_3 : a 3 = some 12 := by\n  have h : IsLeast {s : ℕ | 3 < s ∧ Nat.Prime (polyP 3 s)} 12 := by\n    refine ⟨by norm_num [polyP], fun x hx => ?_⟩\n    by_contra! h\n    interval_cases x <;> norm_num [polyP] at hx\n  have h_ex : ∃ s : ℕ, 3 < s ∧ Nat.Prime (polyP 3 s) := ⟨12, h.1⟩\n  rw [a, if_pos h_ex, h.csInf_eq]\n\n@[category test, AMS 11]\ntheorem a_4 : a 4 = some 12 := by\n  have h : IsLeast {s : ℕ | 4 < s ∧ Nat.Prime (polyP 4 s)} 12 := by\n    refine ⟨by norm_num [polyP], fun x hx => ?_⟩\n    by_contra! h\n    interval_cases x <;> norm_num [polyP] at hx\n  have h_ex : ∃ s : ℕ, 4 < s ∧ Nat.Prime (polyP 4 s) := ⟨12, h.1⟩\n  rw [a, if_pos h_ex, h.csInf_eq]\n\n@[category test, AMS 11]\ntheorem a_5 : a 5 = some 9 := by\n  have h : IsLeast {s : ℕ | 5 < s ∧ Nat.Prime (polyP 5 s)} 9 := by\n    refine ⟨by norm_num [polyP], fun x hx => ?_⟩\n    by_contra! h\n    interval_cases x <;> norm_num [polyP] at hx\n  have h_ex : ∃ s : ℕ, 5 < s ∧ Nat.Prime (polyP 5 s) := ⟨9, h.1⟩\n  rw [a, if_pos h_ex, h.csInf_eq]\n\n@[category test, AMS 11]\ntheorem a_6 : a 6 = some 21 := by\n  have h : IsLeast {s : ℕ | 6 < s ∧ Nat.Prime (polyP 6 s)} 21 := by\n    refine ⟨by norm_num [polyP], fun x hx => ?_⟩\n    by_contra! h\n    interval_cases x <;> norm_num [polyP] at hx\n  have h_ex : ∃ s : ℕ, 6 < s ∧ Nat.Prime (polyP 6 s) := ⟨21, h.1⟩\n  rw [a, if_pos h_ex, h.csInf_eq]\n\n/-- The polynomial $s_n(x) = \\sum_{k=0}^n (k+1) x^k$ over $\\mathbb{Z}[x]$. -/\nnoncomputable def polyS (n : ℕ) : Polynomial ℤ :=\n  ∑ k ∈ Finset.range (n + 1), Polynomial.C (k + 1 : ℤ) * Polynomial.X ^ k\n\n/--\nConjecture: For each $n \\ge 2$, there are infinitely many primes of the form\n$1 + 2s + \\dots + n s^{n-1}$ where $s$ is a positive integer.\n-/\n@[category research open, AMS 11]\ntheorem conjecture_1 (n : ℕ) (hn : 2 ≤ n) :\n    {s : ℕ | 0 < s ∧ Nat.Prime (polyP n s)}.Infinite := by\n  sorry\n\n/--\nConjecture: For each $n \\ge 2$, $a(n) < 12 n^2$.\n-/\n@[category research open, AMS 11]\ntheorem conjecture_2 (n : ℕ) (hn : 2 ≤ n) :\n    ∃ m < 12 * n ^ 2, a n = some m := by\n  sorry\n\n/--\nConjecture: The polynomials $s_n(x) = \\sum_{k=0}^n (k+1) x^k$ for\n$n \\ge 1$ are all irreducible over the field of rational numbers.\n-/\n@[category research open, AMS 11 12]\ntheorem conjecture_3 (n : ℕ) (hn : 1 ≤ n) :\n    Irreducible (Polynomial.map (Int.castRingHom ℚ) (polyS n)) := by\n  sorry\n\n/--\nConjecture: For $n \\ge 1$, the polynomial $s_n(x) = \\sum_{k=0}^n (k+1) x^k$ is\nreducible modulo every prime if and only if $n$ has the form $8k(k+1)$ where $k$ is a\npositive integer.\n-/\n@[category research open, AMS 11 12]\ntheorem conjecture_4 (n : ℕ) (hn : 1 ≤ n) :\n    (∀ p : ℕ, p.Prime → ¬ Irreducible (Polynomial.map (Int.castRingHom (ZMod p)) (polyS n))) ↔\n      ∃ k : ℕ, 0 < k ∧ n = 8 * k * (k + 1) := by\n  sorry\n\nend OeisA217785\n",
  "statement_hash": "655e06f0a3a39e2ede83c92cb7772fb9b7a66ae5d890097b310bfda58f9f2d3c",
  "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."
}