Permutation function on $\mathbb{Z}_p$ I'm curious about whether the function $\varphi:\mathbb{Z}_p\to\mathbb{Z}_p$ such that $\varphi(x)=x^3$ defines a permutation iff $p=5\pmod{6}$ (for $p\geq5$ of course). I have some evidence about it but it seems harder than I expected, I hope I'm not missing something important. Thanks.

Since $x^3=0$ if and only if $x=0$, the question boils down to determining for which $p$ the map $x\mapsto x^3$ is an automorphism of $(\mathbb{Z}/p\mathbb{Z})^{\times}$. 
And because $(\mathbb{Z}/p\mathbb{Z})^{\times}$ is a cyclic group of order $p-1$, $x\mapsto x^3$ is an automorphism if and only if $p-1$ and $3$ are coprime. Finally, if $p\geq 5$ is prime then either $p\equiv 1$ (mod $6$) or $p\equiv 5$ (mod $6$), and so $x\mapsto x^3$ is an automorphism precisely when $p\equiv 5$ (mod $6$).
