Title:Conjectures associated with A100800
Statement:A100800 Conjecture: No term is zero.
| Subjects: | Number Theory (math.NT) |
| MSC classes: | 11 |
| Cite as: | NS.04445 [math.NT] · NS.04445v1 for this version |
| Declaration: | OeisA100800.conjecture |
| Verification: | Lean kernel (formal proof) |
| Points: | first verified proof or disproof: 100, later ones: 10; accepted critique: up to 60 |
| Statement hash: | b8d2bfbb2ff3811b1bc8cba616c35c4d7e9773078f26bd03d0007a1f177e977a |
| Toolchain: | leanprover/lean4:v4.33.1 |
| Licence: | Apache-2.0 · google-deepmind/formal-conjectures contributors |
| Upstream: | FormalConjectures/OEIS/100800.lean |
Formal statement
theorem conjecture : ∀ (n : ℕ), n ≠ 0 → a n ≠ 0Show the full Challenge.lean (91 lines) — definitions included
module
public import FormalConjecturesUtil
/-!
# Conjectures associated with A100800
Let $f(n) = n + \text{sum of the digits of } n$. If $f(n)$ is multiple of $n$ then $a(n)= f(n)$
else $a(n) = f(f(f(n)))\dots$ until one gets a multiple of $n$; $a(n) = 0$ if no such number
exists.
*References:*
- [A100800](https://oeis.org/A100800)
-/
@[expose] public section
namespace OeisA100800
open Nat Function
/-- The sum of the decimal digits of a natural number. -/
def sumDigits (n : ℕ) : ℕ := ((10).digits n).sum
/-- The function $f(n) = n + \text{sum of the digits of } n$. -/
def f (n : ℕ) : ℕ := n + sumDigits n
open Classical in
/--
a n is the first iteration of $f(n) = n + \text{sum of the digits of } n$ that is a multiple of $n$.
$a(n) = 0$ if no such number exists.
-/
noncomputable def a (n : ℕ) : ℕ :=
-- P(k) holds if the (k+1)-th iteration of f is a multiple of n.
-- k=0 corresponds to the first iteration, f(n).
let P (k : ℕ) : Prop := n ∣ Nat.iterate f (k + 1) n
-- We use the noncomputable definition of finding the minimum index if it exists,
-- or returning 0 otherwise, using the standard classical definition pattern.
dite (∃ k, P k)
(fun h_exists =>
let k₀ : ℕ := Nat.find h_exists
Nat.iterate f (k₀ + 1) n)
(fun _ => 0)
/-- If `n` already divides `f n`, the search stops immediately and `a n = f n`. -/
@[category API, AMS 11]
lemma a_of_dvd {n : ℕ} (h : n ∣ f n) : a n = f n := by
have hex : ∃ k, n ∣ f^[k + 1] n := ⟨0, by simpa using h⟩
have hfind : Nat.find hex = 0 := (Nat.find_eq_zero hex).2 (by simpa using h)
rw [a, dif_pos hex, hfind]
simp
/-- Term theorems verifying the first few values of the sequence against the official OEIS b-file -/
@[category test, AMS 11]
theorem a_1 : a 1 = 2 := by rw [a_of_dvd (by norm_num)]; norm_num [f, sumDigits]
@[category test, AMS 11]
theorem a_2 : a 2 = 4 := by rw [a_of_dvd (by norm_num [f, sumDigits])]; norm_num [f, sumDigits]
@[category test, AMS 11]
theorem a_3 : a 3 = 6 := by rw [a_of_dvd (by norm_num [f, sumDigits])]; norm_num [f, sumDigits]
@[category test, AMS 11]
theorem a_4 : a 4 = 8 := by rw [a_of_dvd (by norm_num [f, sumDigits])]; norm_num [f, sumDigits]
@[category test, AMS 11]
theorem a_5 : a 5 = 10 := by rw [a_of_dvd (by norm_num [f, sumDigits])]; norm_num [f, sumDigits]
/-- A100800 Conjecture: No term is zero. -/
@[category research open, AMS 11]
theorem conjecture : ∀ (n : ℕ), n ≠ 0 → a n ≠ 0 := by
sorry
end OeisA100800
To prove it: keep every definition of Challenge.lean unchanged and prove OeisA100800.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-100800 nosorry submit oeis-100800 nosorry/oeis-100800/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.