Skip to content

Problem 2

Given a positive base-10 positive integer N=anan−1…a1a0N=a_na_{n-1}\ldots a_1a_0, let f(N)=2na0+2n−1a1+⋯+21an−1+20anf(N)=2^na_0+2^{n-1}a_1+\cdots+2^1a_{n-1}+2^0a_n. Find f(f(…f(20142014)…))f(f(\ldots f(2014^{2014})\ldots)) (201420142014^{2014} applications of ff).

Solution

Answer: 1919

For positive NN, f(N)>0f(N)>0. If N≥100N\geq100, its highest digit index satisfies n≥2n\geq2, and f(N)≤9(2n+2n−1+⋯+1)<9⋅2n+1<10n≤Nf(N)\leq9(2^n+2^{n-1}+\cdots+1)\lt 9\cdot2^{n+1}\lt 10^n\leq N.

If 20≤N<10020\leq N\lt 100, write N=10a1+a0N=10a_1+a_0, with a1≥2a_1\geq2. Then f(N)=2a0+a1<10a1+a0=Nf(N)=2a_0+a_1\lt 10a_1+a_0=N. Repeated applications therefore decrease the value until it is between 11 and 1919.

Also, if 19∣N19\mid N, then 19∣f(N)19\mid f(N). Indeed, using 20≡1(mod19)20\equiv1\pmod{19},

10nf(N)=∑j=0n10n2n−jaj≡∑j=0n10jaj=N(mod19).10^nf(N)=\sum_{j=0}^{n}10^n2^{n-j}a_j\equiv\sum_{j=0}^{n}10^ja_j=N\pmod{19}.

Since 2014=19⋅1062014=19\cdot106, the starting value is divisible by 1919, and every iterate remains divisible by 1919. The only such positive value at most 1919 is 1919, which is fixed by ff.