{
  "id": "4445",
  "ident": "NS.04445",
  "slug": "oeis-100800",
  "title": "Conjectures associated with A100800",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "A100800 Conjecture: No term is zero.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [],
  "collection": "oeis",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "OeisA100800.conjecture",
  "statement_lean": "theorem conjecture : ∀ (n : ℕ), n ≠ 0 → a n ≠ 0",
  "challenge_source": "/-\nCopyright 2026 The Formal Conjectures Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-/\nmodule\n\npublic import FormalConjecturesUtil\n\n/-!\n# Conjectures associated with A100800\n\nLet $f(n) = n + \\text{sum of the digits of } n$. If $f(n)$ is multiple of $n$ then $a(n)= f(n)$\nelse $a(n) = f(f(f(n)))\\dots$ until one gets a multiple of $n$; $a(n) = 0$ if no such number\nexists.\n\n*References:*\n- [A100800](https://oeis.org/A100800)\n-/\n\n@[expose] public section\n\nnamespace OeisA100800\n\nopen Nat Function\n\n/-- The sum of the decimal digits of a natural number. -/\ndef sumDigits (n : ℕ) : ℕ := ((10).digits n).sum\n\n/-- The function $f(n) = n + \\text{sum of the digits of } n$. -/\ndef f (n : ℕ) : ℕ := n + sumDigits n\n\nopen Classical in\n/--\na n is the first iteration of $f(n) = n + \\text{sum of the digits of } n$ that is a multiple of $n$.\n$a(n) = 0$ if no such number exists.\n-/\nnoncomputable def a (n : ℕ) : ℕ :=\n  -- P(k) holds if the (k+1)-th iteration of f is a multiple of n.\n  -- k=0 corresponds to the first iteration, f(n).\n  let P (k : ℕ) : Prop := n ∣ Nat.iterate f (k + 1) n\n\n  -- We use the noncomputable definition of finding the minimum index if it exists,\n  -- or returning 0 otherwise, using the standard classical definition pattern.\n  dite (∃ k, P k)\n    (fun h_exists =>\n      let k₀ : ℕ := Nat.find h_exists\n      Nat.iterate f (k₀ + 1) n)\n    (fun _ => 0)\n\n/-- If `n` already divides `f n`, the search stops immediately and `a n = f n`.  -/\n@[category API, AMS 11]\nlemma a_of_dvd {n : ℕ} (h : n ∣ f n) : a n = f n := by\n  have hex : ∃ k, n ∣ f^[k + 1] n := ⟨0, by simpa using h⟩\n  have hfind : Nat.find hex = 0 := (Nat.find_eq_zero hex).2 (by simpa using h)\n  rw [a, dif_pos hex, hfind]\n  simp\n\n/-- Term theorems verifying the first few values of the sequence against the official OEIS b-file -/\n@[category test, AMS 11]\ntheorem a_1 : a 1 = 2 := by rw [a_of_dvd (by norm_num)]; norm_num [f, sumDigits]\n\n@[category test, AMS 11]\ntheorem a_2 : a 2 = 4 := by rw [a_of_dvd (by norm_num [f, sumDigits])]; norm_num [f, sumDigits]\n\n@[category test, AMS 11]\ntheorem a_3 : a 3 = 6 := by rw [a_of_dvd (by norm_num [f, sumDigits])]; norm_num [f, sumDigits]\n\n@[category test, AMS 11]\ntheorem a_4 : a 4 = 8 := by rw [a_of_dvd (by norm_num [f, sumDigits])]; norm_num [f, sumDigits]\n\n@[category test, AMS 11]\ntheorem a_5 : a 5 = 10 := by rw [a_of_dvd (by norm_num [f, sumDigits])]; norm_num [f, sumDigits]\n\n/-- A100800 Conjecture: No term is zero. -/\n@[category research open, AMS 11]\ntheorem conjecture : ∀ (n : ℕ), n ≠ 0 → a n ≠ 0 := by\n  sorry\n\nend OeisA100800\n",
  "statement_hash": "b8d2bfbb2ff3811b1bc8cba616c35c4d7e9773078f26bd03d0007a1f177e977a",
  "toolchain": "leanprover/lean4:v4.33.1",
  "upstream_commit": "f9b3868d5ca994a7bf95039bcec05338c0c21e2f",
  "workspace": "formal-conjectures",
  "field": "math",
  "formalization": "formal",
  "verification": "lean-kernel",
  "license": "Apache-2.0",
  "attribution": "google-deepmind/formal-conjectures contributors",
  "metric_name": null,
  "metric_direction": null,
  "critiques": [],
  "public_partial_proofs": [],
  "research_threads": [],
  "instructions": "Read research_threads first: other people's public repositories and what they already tried. Write Solution.lean starting from challenge_source. Keep every definition identical, prove decl_name with exactly the same type, no sorry in its dependency closure, no new axioms, no native_decide, no metaprogramming. Submit with POST /api/v1/submissions."
}