Find all functions $f: \mathbb{N}^{*} \rightarrow \mathbb{N}^{*}$ that satisfy:

$$
f^{a b c-a}(a b c)+f^{a b c-b}(a b c)+f^{a b c-c}(a b c)=a+b+c
$$

For all $a, b, c \geq 2$ where $f^{k}(n)$ denotes the $k$-th iterate of $f$.
The solution is $f(n)=n-1$ for all $n \geq 3$ with $f(1)$ and $f(2)$ arbitrary; and it is easy to verify that it works.

Lemma: We have $f^{t^{2}-t}\left(t^{2}\right)=t$ for all $t \geq 2$.

Proof: We say that $1 \leq k \leq 7$ is good if $f^{t^{9}}-t^{k}\left(t^{9}\right)=t^{k}$. We first note that:

$$
\begin{gathered}
f^{t^{9}-t^{3}}\left(t^{9}\right)=t^{3} \\
f^{t^{3}-t}\left(t^{3}\right)=t \Longrightarrow f^{t^{9}-t}\left(t^{9}\right)=t
\end{gathered}
$$

So $k=1$ and $k=3$ are good. By taking $(a, b, c)=\left(t, t^{4}, t^{4}\right),(a, b, c)=\left(t, t^{3}, t^{5}\right),(a, b, c)=$ $\left(t^{2}, t^{2}, t^{5}\right)$, we get that $4,5,2$ are good as well. Therefore:

$$
f^{t^{2}-t}\left(t^{2}\right)=f^{t^{2}-t}\left(f^{t^{9}-t^{2}}\left(t^{9}\right)\right)=f^{t^{9}-t}\left(t^{9}\right)=t
$$

Let $t=a b c$ and combine:

$$
\begin{aligned}
f^{t-a}(a)+f^{t-b}(b)+f^{t-c}(c) & =a+b+c \\
f^{t^{2}-a b}\left(t^{2}\right)+f^{t^{2}-t}\left(t^{2}\right)+f^{t^{2}-c}\left(t^{2}\right) & =a b+t+c \\
\Longrightarrow\left[f^{t-a}(t)-a\right]+\left[f^{t-b}(t)-b\right] & =\left[f^{t-a b}(t)-a b\right]
\end{aligned}
$$

By subtracting and applying the previous lemma. So if $p>q>\max \{a, b\}$ are primes, by setting $s=a^{p} b^{q}$ and $t=s^{2}$ we get:

$$
p\left[f^{t-a}(t)-a\right]+q\left[f^{t-b}(t)-b\right]=\left[f^{t-s}(s)-s\right]=0
$$

Since $q\left|f^{t-a}(t)-a, p\right| f^{t-b}(t)-b$, we can conclude that $f^{t-a}(t)=a$ and $f^{t-b}(t)=b$ for all $a, b \geq 2$, with $t=a^{p} b^{q}$. In particular, if $a=n$ and $b=n+1$ we deduce $f(n+1)=n$.

## - Algebra -