Find all functions $f$ from $\mathbb{Z}$ to $\mathbb{Z}$ such that $f(p)>0$ for all prime $p$ and such that for all prime $p$ and for all $x$:

$$
p \mid (f(x) + f(p))^{f(p)} - x
$$
We take $x=p$ an odd prime, which gives $p \mid f(p)$ for all odd prime $p$. In particular, $x=0$ gives $p \mid f(0)$ for all odd prime $p$, so $f(0)=0$. With $x=0$ and $p=2$, we get $2 \mid f(2)$.

Now let's show that $f(q)$ has only $q$ as a prime factor. Let $p$ be a factor of $f(q)$, take $x=q$, this gives:

$$
p\left|(f(p)+f(q))^{f(p)}-q \Longrightarrow p\right| q
$$

Which is obviously impossible. Therefore, $f(q)=q^{\alpha}$. In particular, we have $f(p) \equiv 0(\bmod p)$ and $f(x)^{f(p)} \equiv f(x)(\bmod p)$ by Fermat's little theorem, so:

$$
p\left|(f(x)+f(p))^{f(p)}-x \Longrightarrow p\right| f(x)^{f(p)}-x \Longrightarrow p \mid f(x)-x
$$

Thus, $f(x)-x$ has infinitely many divisors and is 0.

Key ideas: When we suspect that only powers of the identity are solutions, try to show that $f(n)$ has the same prime factors as $n$. Find an infinite number of prime divisors for the values we think are zero.