Title:Concatenation of the next numbers
Statement:"The second term is a prime. When is the next prime, if there is another?
- N. J. A. Sloane, Dec 16 2016"
| Subjects: | Number Theory (math.NT) |
| MSC classes: | 11 |
| Tags: | question |
| Cite as: | NS.06635 [math.NT] · NS.06635v1 for this version |
| Declaration: | OeisA53067.conjecture |
| Verification: | Lean kernel (formal proof) |
| Points: | first verified proof or disproof: 100, later ones: 10; accepted critique: up to 60 |
| Statement hash: | dd3070b92f6212e7ac76e66ebae57fba8c7c5e8532f0a3f3a842d90b2660f9e1 |
| Toolchain: | leanprover/lean4:v4.33.1 |
| Licence: | Apache-2.0 · google-deepmind/formal-conjectures contributors |
| Upstream: | FormalConjectures/OEIS/53067.lean |
Formal statement
theorem conjecture :
conjecture.answer =
if h : ∃ n, 2 < n ∧ (a n).Prime then
some (sInf {n | 2 < n ∧ (a n).Prime})
else
noneShow the full Challenge.lean (88 lines) — definitions included
module
public import FormalConjecturesUtil
/-!
# Concatenation of the next $n$ numbers
$a(n)$ is the concatenation of the next $n$ numbers: the integers from
$\frac{(n-1)n}{2} + 1$ up to $\frac{n(n+1)}{2}$.
*References:*
- [A053067](https://oeis.org/A053067)-/
@[expose] public section
namespace OeisA53067
/-- The $n$-th triangular number, $T_n = \frac{n(n+1)}{2}$. -/
def triangular (n : ℕ) : ℕ := n * (n + 1) / 2
/-- Concatenates two natural numbers $a$ and $b$ base 10. -/
def concatenateNats (a b : ℕ) : ℕ :=
a * (10 ^ (Nat.digits 10 b).length) + b
/-- $a(n)$ is the concatenation of the next $n$ numbers. -/
def a (n : ℕ) : ℕ :=
if n = 0 then 0
else
let start_num : ℕ := triangular (n - 1) + 1
let end_num : ℕ := triangular n
let numbers_to_concat : List ℕ := List.Ico start_num (end_num + 1)
numbers_to_concat.foldl concatenateNats 0
@[category test, AMS 11]
theorem a_1 : a 1 = 1 := by
decide
@[category test, AMS 11]
theorem a_2 : a 2 = 23 := by
decide
@[category test, AMS 11]
theorem a_3 : a 3 = 456 := by
decide
@[category test, AMS 11]
theorem a_4 : a 4 = 78910 := by
decide
@[category test, AMS 11]
theorem a_5 : a 5 = 1112131415 := by
decide
def conjecture.answer : Option ℕ := sorry
open scoped Classical in
/--
"The second term is a prime. When is the next prime, if there is another?
- _N. J. A. Sloane_, Dec 16 2016"
-/
@[category research open, question value, AMS 11]
theorem conjecture :
conjecture.answer =
if h : ∃ n, 2 < n ∧ (a n).Prime then
some (sInf {n | 2 < n ∧ (a n).Prime})
else
none := by
sorry
end OeisA53067
To prove it: keep every definition of Challenge.lean unchanged and prove OeisA53067.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-53067 nosorry submit oeis-53067 nosorry/oeis-53067/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.