ISL 2009 C8
For any integer , we compute the integer by applying the following procedure to its decimal representation. Let be the rightmost digit of . (1) If , then the decimal representation of results from the decimal representation of by removing this rightmost digit 0 . (2) If we split the decimal representation of into a maximal right part that solely consists of digits not less than and into a left part that either is empty or ends with a digit strictly smaller than . Then the decimal representation of consists of the decimal representation of , followed by two copies of the decimal representation of . For instance, for the number , we will have and . Prove that, starting with an arbitrary integer , iterated application of produces the integer 1 after finitely many steps.
Dataset text NuminaMath olympiads. Quoted with source.
Official text: IMO 2009 Shortlist booklet, page 9.
Solutions
Official solution Solution 1 by the IMO Problem Selection Committee
The terms of the source let olymmath link to this solution but not copy it. Read the solution (IMO official site).