Title:Smallest prime formed by concatenation
Statement:Conjecture: There are infinitely many composite numbers such that is nonzero.
| Subjects: | Number Theory (math.NT) |
| MSC classes: | 11 |
| Cite as: | NS.06939 [math.NT] · NS.06939v1 for this version |
| Declaration: | OeisA87571.conjecture |
| Verification: | Lean kernel (formal proof) |
| Points: | first verified proof or disproof: 100, later ones: 10; accepted critique: up to 60 |
| Statement hash: | eb4528a167c61b5fe9a5e96c66164897632e5cfde1bf53608def7644df48af1c |
| Toolchain: | leanprover/lean4:v4.33.1 |
| Licence: | Apache-2.0 · google-deepmind/formal-conjectures contributors |
| Upstream: | FormalConjectures/OEIS/87571.lean |
Formal statement
theorem conjecture (M : ℕ) : ∃ n > M, 1 < n ∧ ¬ n.Prime ∧ a n ≠ 0Show the full Challenge.lean (79 lines) — definitions included
module
public import FormalConjecturesUtil
/-!
# Smallest prime formed by concatenation $n, n-1, \dots, n-k$
$a(n)$ is the smallest prime which has the form of the concatenation
$n, n-1, n-2, \dots, n-k$ for some $k < n$, or $0$ if no such prime exists.
*References:*
- [A087571](https://oeis.org/A087571)-/
@[expose] public section
namespace OeisA87571
/-- Concatenate a list of numbers into a list of decimal digits in most-significant-first order. -/
def getAllDigitsMsf (L : List ℕ) : List ℕ :=
List.flatten (L.map fun k => (Nat.digits 10 k).reverse)
/-- Convert a list of decimal digits (most significant first) to a natural number. -/
def ofDigitsMsf (D : List ℕ) : ℕ :=
D.foldl (fun acc d => acc * 10 + d) 0
/-- Concatenation of numbers $n, n-1, \dots, n-k$. -/
def concatNum (n : ℕ) (k : ℕ) : ℕ :=
ofDigitsMsf (getAllDigitsMsf ((List.range (k + 1)).map fun i => n - i))
/-- Smallest prime of the form $n, n-1, \dots, n-k$ for $k < n$, or $0$ if none exists. -/
def a (n : ℕ) : ℕ :=
match ((List.range n).map (concatNum n)).find? Nat.Prime with
| some p => p
| none => 0
/-- Value of the sequence `a` at 0. -/
@[category test, AMS 11]
theorem a_0 : a 0 = 0 := by decide
/-- Value of the sequence `a` at 1. -/
@[category test, AMS 11]
theorem a_1 : a 1 = 0 := by decide
/-- Value of the sequence `a` at 2. -/
@[category test, AMS 11]
theorem a_2 : a 2 = 2 := by decide
/-- Value of the sequence `a` at 3. -/
@[category test, AMS 11]
theorem a_3 : a 3 = 3 := by decide
/-- Value of the sequence `a` at 4. -/
@[category test, AMS 11]
theorem a_4 : a 4 = 43 := by decide
/--
Conjecture: There are infinitely many composite numbers $n$ such that $a(n)$ is nonzero.-/
@[category research open, AMS 11]
theorem conjecture (M : ℕ) : ∃ n > M, 1 < n ∧ ¬ n.Prime ∧ a n ≠ 0 := by
sorry
end OeisA87571
To prove it: keep every definition of Challenge.lean unchanged and prove OeisA87571.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-87571 nosorry submit oeis-87571 nosorry/oeis-87571/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.