A338545: Numbers that escape to infinity when applying this algorithm: if xi <= rev(xi) then xi+1 = rev(xi) - xi else xi+1 = rev(xi) + xi.
Statement
All numbers up to 3762 (not already being a palindrome) are mapped sooner or later onto a palindrome and collapse to 0 in the next step of the algorithm. But unlike in the Collatz conjecture (see A006370) where probably all numbers fall back to 1, here most numbers never fall back to 0. Instead, they fall onto repetitive patterns which increase by one order of magnitude every three steps and hence go to infinity. For instance if the algorithm reaches the number 19799999999999991002000000000000088 at step k it will reach 1979999999999999910020000000000000088 at step k+6. And every six steps one 9 is added to the long line of 9's and one 0 is added right of the 2. Up to 100000 there are 3 repetitive patterns, which contain the numbers listed in the second line of the Python code below (escape = [...]).
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-a338545.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-a338545.lean
import Mathlib /-! # A338545: Numbers that escape to infinity when applying this algorithm: if xi <= rev(xi) then xi+1 = rev(xi) - xi else xi+1 = rev(xi) + xi. Source: https://oeis.org/A338545 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_a338545 -- definitions the statement needs (no sorry, no axiom) theorem main : sorry := by sorry end OMA.S_oeis_a338545