Lisa writes a positive whole number in the decimal system on the blackboard and now makes in each turn the following: The last digit is deleted from the number on the board and then the remaining shorter number (or 0 if the number was one digit) becomes four times the number deleted number added. The number on the board is now replaced by the result of this calculation. Lisa repeats this until she gets a number for the first time was on the board. (a) Show that the sequence of moves always ends. (b) If Lisa begins with the number $53^{2022} - 1$, what is the last number on the board? Example: If Lisa starts with the number $2022$, she gets $202 + 4\cdot 2 = 210$ in the first move and overall the result $$2022 \to 210 \to 21 \to 6 \to 24 \to 18 \to 33 \to 15 \to 21$$. Since Lisa gets $21$ for the second time, the turn order ends. (Stephan Pfannerer)
Problem
Source: 2022 Austrian Federal Competition For Advanced Students, Part 2 p3
Tags: combinatorics, number theory, game