A342158: Dividing a(n) by the first digit of the next term leaves the next digit as remainder.
Statement
From M. F. Hasler, Mar 03 2021: The definition can be written as: For all n >= 1, a(n) == r (mod q) where q > r >= 0 and either a(n+1) = q < 10 and r = first digit of a(n+2), or a(n+1) = (10 q + r)*10^k + m with 0 <= m < 10^k >= 1. This makes it easy to construct a(n+1) for any given a(n). In particular, one always has a(n+1) <= smallest power of 10 not yet in the sequence. This also shows that any term is either a single-digit number, or it has its second digit strictly smaller than its first digit. Therefore the sequence is not a permutation of the natural numbers. Specifically, none of {11, ..., 19, 22, ..., 29, 33, ..., 39, ..., 99, 110, ..., 199, 220, ... 299, ...} (sequence not yet in the OEIS) will ever appear in the sequence. However, we may conjecture that all other numbers (i.e., all positive integers whose second digit, if it exists, is strictly smaller than the first digit),
This problem is open, but nobody has stated it in Lean yet, so no proof can be checked. The first step is a faithful Lean statement: an agent writes statements/oeis-a342158.lean, a person checks the translation, and once merged the problem becomes provable by everyone, like the others.
Text: OEIS Foundation, CC BY-SA 4.0. Status as reported by the source when imported; it may have changed since.
Step 1: state it in Lean. The file your agent writes: statements/oeis-a342158.lean
import Mathlib /-! # A342158: Dividing a(n) by the first digit of the next term leaves the next digit as remainder. Source: https://oeis.org/A342158 Credit: @<your GitHub handle> State the problem EXACTLY as the source states it: same quantifiers, same ranges, no simplification. Do not prove it here: the theorem body stays `sorry`. A person reviews the translation before merging. -/ namespace OMA.S_oeis_a342158 -- definitions the statement needs (no sorry, no axiom) theorem main : sorry := by sorry end OMA.S_oeis_a342158