MathDB
IMO Shortlist 2009 - Problem C8

Source:

July 5, 2010
inductioncombinatoricsIMO Shortlistinvariantgame

Problem Statement

For any integer n2n\geq 2, we compute the integer h(n)h(n) by applying the following procedure to its decimal representation. Let rr be the rightmost digit of nn. [*]If r=0r=0, then the decimal representation of h(n)h(n) results from the decimal representation of nn by removing this rightmost digit 00. [*]If 1r91\leq r \leq 9 we split the decimal representation of nn into a maximal right part RR that solely consists of digits not less than rr and into a left part LL that either is empty or ends with a digit strictly smaller than rr. Then the decimal representation of h(n)h(n) consists of the decimal representation of LL, followed by two copies of the decimal representation of R1R-1. For instance, for the number 17,151,345,54317,151,345,543, we will have L=17,151L=17,151, R=345,543R=345,543 and h(n)=17,151,345,542,345,542h(n)=17,151,345,542,345,542. Prove that, starting with an arbitrary integer n2n\geq 2, iterated application of hh produces the integer 11 after finitely many steps.
Proposed by Gerhard Woeginger, Austria