Title:Sum of next primes
Statement:The only positive integer such that is a perfect square is .
- Carlos Eduardo Olivieri, Mar 09 2015
| Subjects: | Number Theory (math.NT) |
| MSC classes: | 11 |
| Cite as: | NS.06821 [math.NT] · NS.06821v1 for this version |
| Declaration: | OeisA7468.conjecture |
| Verification: | Lean kernel (formal proof) |
| Points: | first verified proof or disproof: 100, later ones: 10; accepted critique: up to 60 |
| Statement hash: | f85235cf3869d0691f65af23578b3c87aae3e23f66772a5671d6069c672126d3 |
| Toolchain: | leanprover/lean4:v4.33.1 |
| Licence: | Apache-2.0 · google-deepmind/formal-conjectures contributors |
| Upstream: | FormalConjectures/OEIS/7468.lean |
Formal statement
theorem conjecture (n : ℕ) (hn : 0 < n) : IsSquare (a n) ↔ n = 38Show the full Challenge.lean (75 lines) — definitions included
module
public import FormalConjecturesUtil
/-!
# Sum of next $n$ primes
The sum of the primes in the $n$-th row of the prime number triangle:
$$a(n) = \sum_{i = 1 + n(n-1)/2}^{n + n(n-1)/2} p_i$$
with $a(0) = 0$.
*References:*
- [A007468](https://oeis.org/A007468)
-/
@[expose] public section
namespace OeisA7468
/-- Sum of the next $n$ primes, with $a(0) = 0$. -/
noncomputable def a (n : ℕ) : ℕ :=
let startIdx : ℕ := (n * (n - 1)) / 2
∑ i ∈ Finset.range n, Nat.nth Nat.Prime (startIdx + i)
/-- Value of the sequence `a` at 0. -/
@[category test, AMS 11]
theorem a_0 : a 0 = 0 := by rfl
/-- Value of the sequence `a` at 1. -/
@[category test, AMS 11]
theorem a_1 : a 1 = 2 := by
dsimp [a]
rw [Finset.sum_singleton, add_zero, Nat.nth_prime_zero_eq_two]
/-- Value of the sequence `a` at 2. -/
@[category test, AMS 11]
theorem a_2 : a 2 = 8 := by
dsimp [a]
rw [Finset.sum_range_succ, Finset.sum_range_one, add_zero, Nat.nth_prime_one_eq_three,
show (1 + 1 : ℕ) = 2 by rfl, Nat.nth_prime_two_eq_five]
/-- Value of the sequence `a` at 3. -/
@[category test, AMS 11]
theorem a_3 : a 3 = 31 := by
dsimp [a]
have h5 : Nat.nth Nat.Prime 5 = 13 := Nat.nth_count (by decide : Nat.Prime 13)
rw [Finset.sum_range_succ, Finset.sum_range_succ, Finset.sum_range_one, add_zero,
Nat.nth_prime_three_eq_seven, show (3 + 1 : ℕ) = 4 by rfl, Nat.nth_prime_four_eq_eleven,
show (3 + 2 : ℕ) = 5 by rfl, h5]
/--
The only positive integer $n$ such that $a(n)$ is a perfect square is $n=38$.
- Carlos Eduardo Olivieri, Mar 09 2015
-/
@[category research open, AMS 11]
theorem conjecture (n : ℕ) (hn : 0 < n) : IsSquare (a n) ↔ n = 38 := by
sorry
end OeisA7468
To prove it: keep every definition of Challenge.lean unchanged and prove OeisA7468.conjecture with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_conjecture : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.
nosorry fetch oeis-7468 nosorry submit oeis-7468 nosorry/oeis-7468/Solution.lean --wait
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.