Problem

Source: Indonesia TSTST - Number Theory

Tags: function, number theory, Indonesia, Indonesia TST, complete residue system, residue, FE NT



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