2023 WSMO Team Round Problems/Problem 8

Problem

Let $f(x)=\sqrt{x-\sqrt{x-\sqrt{x-\ldots}}}.$ Find the modulo 1000 on the minimum integer $a$ such $f(f(f(f(f(a)))))$ is a positive integer.

Solution

Note that \begin{align*} f(x) &= \sqrt{x-f(x)}\implies\\ [f(x)]^2 &= x-f(x)\implies\\ x &= [f(x)]^2+f(x). \end{align*} Since $[f(x)]^2+f(x)$ is a strictly increasing function, the minimum value of $a$ occurs when \begin{align*} f(f(f(f(f(a))))) &= 1\implies\\ f(f(f(f(a)))) &= 1^2+1 = 2\implies\\ f(f(f(a))) &= 2^2+2 = 6\implies\\ f(f(a)) &= 6^2+6 = 42\implies\\ f(a) &= 42^2+42 = 1806\implies\\ a &= 1806^2+1806\implies\\ a&\equiv \boxed{442}\pmod{1000}. \end{align*}

~pinkpig