MathDB
N with last digit c, wipe c and name it as m, replace m with m-3c

Source: Czech And Slovak Mathematical Olympiad, Round III, Category A 2013 p4

February 17, 2020
combinatoricsgameDigitsDigit

Problem Statement

On the board is written in decimal the integer positive number NN. If it is not a single digit number, wipe its last digit cc and replace the number mm that remains on the board with a number m3cm -3c. (For example, if N=1,204N = 1,204 on the board, 12034=108120 - 3 \cdot 4 = 108.) Find all the natural numbers NN, by repeating the adjustment described eventually we get the number 00.