Find all functions $f:\mathbb{N} \rightarrow \mathbb{N}$ such that for every prime number $p$ and natural number $x$,
$$\{ x,f(x),\cdots f^{p-1}(x) \} $$is a complete residue system modulo $p$. With $f^{k+1}(x)=f(f^k(x))$ for every natural number $k$ and $f^1(x)=f(x)$.
Proposed by IndoMathXdZ
Cute problem.
If $\mid f(x) - x \mid \geq 2$, consider a prime dividing $\mid f(x) - x \mid$ and we see that it's a contradiction.
Also $f(x) \neq x$ so $\mid f(x) - x \mid = 1$, and we see that $f(1)=2$.
By induction, we assume $f(n) = n+1$. If $f(n+1)=n$, then $f(f(n)) = n$ and it's a contradiction.
So the answer is $f(x) = x+1$ for all $x \in \mathbb{N}$.