Let $\mathbb{N}$ be the set of positive integers. Find all functions $f: \mathbb{N} \rightarrow \mathbb{N}$ that satisfy the equation  
$$ 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$. (Here $f^{k}$ means $f$ applied $k$ times.)
The answer is $f(n)=n-1$ for $n \geq 3$ with $f(1)$ and $f(2)$ arbitrary; check these work.  ## Lemma  We have $f^{t^{2}-t}\left(t^{2}\right)=t$ for all $t$.  $$ f^{t^{9}-t^{3}}\left(t^{9}\right)=t^{3} \quad \text { and } \quad f^{t^{3}-t}\left(t^{3}\right)=t \Longrightarrow f^{t^{9}-t}\left(t^{9}\right)=t $$  so $k=1$ and $k=3$ are good. Then taking $(a, b, c)=\left(t, t^{4}, t^{4}\right),(a, b, c)=\left(t^{2}, t^{3}, t^{4}\right)$ gives that $k=4$ and $k=2$ are good, respectively. The lemma follows from this $k=1$ and $k=2$ being good.  Now, letting $t=a b c$ we 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 lemma repeatedly. In other words, we have proven the second lemma:  ## Lemma  Let $t$ be fixed, and define $g_{t}(n)=f^{t-n}(t)-n$ for $n<q>\max \{a, b\}$ be primes. Suppose $s=a^{p} b^{q}$ and $t=s^{2}$; then  $$ p g_{t}(a)+q g_{t}(b)=g_{t}\left(a^{p} b^{q}\right)=g_{t}(s)=f^{s^{2}-s}(s)-s=0 $$  Now  $$ q \mid g_{t}(a)>-a \quad \text { and } \quad p \mid g_{t}(b)>-b \Longrightarrow g_{t}(a)=g_{t}(b)=0 $$  and so we conclude $f^{t-a}(t)=a$ and $f^{t-b}(t)=b$ for $a, b \geq 2$. In particular, if $a=n$ and $b=n+1$ then we deduce $f(n+1)=n$ for all $n \geq 2$, as desired.  Remark. If you let $c=(a b)^{2}$ after the first lemma, you recover the 2-variable version!