Find all functions $ f : \mathbb N \to \mathbb N $ satisfying $$ f \Big( f \big( f ( n ) \big) \Big) + 6 f ( n ) = 3 f \big( f ( n ) \big) + 4 n + 2001 , \forall n \in \mathbb N \text . $$
After some trial and error, I assumed the solution to be of the form $ f ( n ) = n + r $, which gave me $ f ( n ) = n + 667 $ as a solution, but I am unable to come up with any other solutions. How would you guys solve this problem?
Given $n \in \mathbb{N}$, define $$ g_n(d) = f^{(d)}(n) - 667d. $$ Routine computation yields the recurrence equation $$ g_n(d+3) = 3g_n(d+2) - 6g_n(d+1) + 4g_n(d). $$ The characteristic polynomial is $$ x^3 - 3x^2 + 6x - 4 = (x-1)(x^2-2x+4). $$ The two roots of $x^2-2x+4$ are $2e^{\pm i \pi/3}$.
It follows from the general theory of recurrence relations that for some real $A,B$ and angle $\theta$, $$g_n(d) = A + B2^d \cos (d\pi/3 + \theta).$$ The cosine part is a periodic function in $d$ attaining $6$ fixed values, at least one of them strictly positive and at least one strictly negative. In particular, if $B \neq 0$ then for some $e \in \{0,\ldots,5\}$ we have $$C \triangleq B\cos (e\pi/3 + \theta) < 0.$$ This implies that $$f^{(6d+e)}(n) = g_n(6d+e) + 4002d + 667e = A + 2^d C + 4002d + 667e $$ is eventually negative. This contradicts the premise that $f \geq 0$, and so $B = 0$. Substituting $d = 0$ in the formula for $g_n$, we deduce that $g_n(d) = A = n$ and so $$ f^{(d)}(n) = n + 667d. $$ In particular, $f(n) = n + 667$.