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

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Smallest integer s>ns > n such that 1+2s+3s2+⋯+nsn−11 + 2s + 3s^2 + \dots + n s^{n-1} is prime

Source:OEIS conjectures
Open problem Nobody knows the answer yet — neither on paper nor in Lean. First verified proof: +100 points.
Statement:reviewed
Statement:

Conjecture: For each n≥2n \ge 2, there are infinitely many primes of the form 1+2s+⋯+nsn−11 + 2s + \dots + n s^{n-1} where ss is a positive integer.

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

Formal statement

theorem conjecture_1 (n : ℕ) (hn : 2 ≤ n) :
    {s : ℕ | 0 < s ∧ Nat.Prime (polyP n s)}.Infinite
Show the full Challenge.lean (134 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Smallest integer $s > n$ such that $1 + 2s + 3s^2 + \dots + n s^{n-1}$ is prime

For $n \ge 2$, $a(n)$ is the smallest integer $s > n$ such that the sum
$P_n(s) = \sum_{k=0}^{n-1} (k+1) s^k$ is a prime number.

*References:*
- [A217785](https://oeis.org/A217785)
-/

@[expose] public section

namespace OeisA217785

/-- `polyP n s` is the sum $\sum_{k=0}^{n-1} (k+1) s^k$. -/
def polyP (n s : ℕ) : ℕ :=
  ∑ k ∈ Finset.range n, (k + 1) * s ^ k

open scoped Classical in
/-- Smallest integer $s > n$ such that `polyP n s` is prime,
or `none` if no such $s$ exists. -/
noncomputable def a (n : ℕ) : Option ℕ :=
  if ∃ s : ℕ, n < s ∧ Nat.Prime (polyP n s) then
    some (sInf {s : ℕ | n < s ∧ Nat.Prime (polyP n s)})
  else
    none

@[category test, AMS 11]
theorem a_2 : a 2 = some 3 := by
  have h : IsLeast {s : ℕ | 2 < s ∧ Nat.Prime (polyP 2 s)} 3 := by
    refine ⟨by norm_num [polyP], fun x hx => ?_⟩
    by_contra! h
    interval_cases x <;> norm_num [polyP] at hx
  have h_ex : ∃ s : ℕ, 2 < s ∧ Nat.Prime (polyP 2 s) := ⟨3, h.1⟩
  rw [a, if_pos h_ex, h.csInf_eq]

@[category test, AMS 11]
theorem a_3 : a 3 = some 12 := by
  have h : IsLeast {s : ℕ | 3 < s ∧ Nat.Prime (polyP 3 s)} 12 := by
    refine ⟨by norm_num [polyP], fun x hx => ?_⟩
    by_contra! h
    interval_cases x <;> norm_num [polyP] at hx
  have h_ex : ∃ s : ℕ, 3 < s ∧ Nat.Prime (polyP 3 s) := ⟨12, h.1⟩
  rw [a, if_pos h_ex, h.csInf_eq]

@[category test, AMS 11]
theorem a_4 : a 4 = some 12 := by
  have h : IsLeast {s : ℕ | 4 < s ∧ Nat.Prime (polyP 4 s)} 12 := by
    refine ⟨by norm_num [polyP], fun x hx => ?_⟩
    by_contra! h
    interval_cases x <;> norm_num [polyP] at hx
  have h_ex : ∃ s : ℕ, 4 < s ∧ Nat.Prime (polyP 4 s) := ⟨12, h.1⟩
  rw [a, if_pos h_ex, h.csInf_eq]

@[category test, AMS 11]
theorem a_5 : a 5 = some 9 := by
  have h : IsLeast {s : ℕ | 5 < s ∧ Nat.Prime (polyP 5 s)} 9 := by
    refine ⟨by norm_num [polyP], fun x hx => ?_⟩
    by_contra! h
    interval_cases x <;> norm_num [polyP] at hx
  have h_ex : ∃ s : ℕ, 5 < s ∧ Nat.Prime (polyP 5 s) := ⟨9, h.1⟩
  rw [a, if_pos h_ex, h.csInf_eq]

@[category test, AMS 11]
theorem a_6 : a 6 = some 21 := by
  have h : IsLeast {s : ℕ | 6 < s ∧ Nat.Prime (polyP 6 s)} 21 := by
    refine ⟨by norm_num [polyP], fun x hx => ?_⟩
    by_contra! h
    interval_cases x <;> norm_num [polyP] at hx
  have h_ex : ∃ s : ℕ, 6 < s ∧ Nat.Prime (polyP 6 s) := ⟨21, h.1⟩
  rw [a, if_pos h_ex, h.csInf_eq]

/-- The polynomial $s_n(x) = \sum_{k=0}^n (k+1) x^k$ over $\mathbb{Z}[x]$. -/
noncomputable def polyS (n : ℕ) : Polynomial ℤ :=
  ∑ k ∈ Finset.range (n + 1), Polynomial.C (k + 1 : ℤ) * Polynomial.X ^ k

/--
Conjecture: For each $n \ge 2$, there are infinitely many primes of the form
$1 + 2s + \dots + n s^{n-1}$ where $s$ is a positive integer.
-/
@[category research open, AMS 11]
theorem conjecture_1 (n : ℕ) (hn : 2 ≤ n) :
    {s : ℕ | 0 < s ∧ Nat.Prime (polyP n s)}.Infinite := by
  sorry

/--
Conjecture: For each $n \ge 2$, $a(n) < 12 n^2$.
-/
@[category research open, AMS 11]
theorem conjecture_2 (n : ℕ) (hn : 2 ≤ n) :
    ∃ m < 12 * n ^ 2, a n = some m := by
  sorry

/--
Conjecture: The polynomials $s_n(x) = \sum_{k=0}^n (k+1) x^k$ for
$n \ge 1$ are all irreducible over the field of rational numbers.
-/
@[category research open, AMS 11 12]
theorem conjecture_3 (n : ℕ) (hn : 1 ≤ n) :
    Irreducible (Polynomial.map (Int.castRingHom ℚ) (polyS n)) := by
  sorry

/--
Conjecture: For $n \ge 1$, the polynomial $s_n(x) = \sum_{k=0}^n (k+1) x^k$ is
reducible modulo every prime if and only if $n$ has the form $8k(k+1)$ where $k$ is a
positive integer.
-/
@[category research open, AMS 11 12]
theorem conjecture_4 (n : ℕ) (hn : 1 ≤ n) :
    (∀ p : ℕ, p.Prime → ¬ Irreducible (Polynomial.map (Int.castRingHom (ZMod p)) (polyS n))) ↔
      ∃ k : ℕ, 0 < k ∧ n = 8 * k * (k + 1) := by
  sorry

end OeisA217785

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

nosorry fetch oeis-217785
nosorry submit oeis-217785 nosorry/oeis-217785/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.