When is the map $x\rightarrow x^k$ injective in $\mathbb Z_n$?

Is there an easy criterion when the map $x\rightarrow x^k$ is injective in $\mathbb Z_n$ ?

For example, the map $x\rightarrow x^3$ is injective in $\mathbb Z_{10}$

Since $\mathbb Z_n$ is finite, the map is injective if and only if it is surjective. So, if we know whether $x^k\equiv c\mod n$ is always solveable, we also know whether the map is injective.


We need to consider the following:

  • If $n$ is not square free, then this mapping is injective only in the trivial case of $k=1$. Should $p^2\mid n$ for some prime $p$ and $k>1$, then the residue classes with representatives divisible by $p$ but not by $p^2$ cannot be in the image. Thus the mapping cannot be surjective, and, as you pointed out, then it cannot be injective either.
  • If $n$ is a product of distinct primes, then the Chinese Remainder Theorem kicks in, and it suffices to check that the corresponding map is bijective modulo each prime factor $p$. Because $\Bbb{Z}_p^*$ is cyclic of order $p-1$ raising to power $k$ is injective in that ring if and only if $\gcd(k,p-1)=1$.

Summary: this mapping is always injective if $k=1$, and otherwise if and only if $n$ is square-free and $\gcd(k,p-1)=1$ for all prime divisors $p\mid n$.