I was reading the book "Rational Points on Elliptic Curves", when I've crossed with the following passage:
"(...) since $3$ does not divide the order $p-1$ (where $p$ is a prime) of the cyclic group $\mathbb{F}_p^*$, then the map $x \mapsto x^3$ is an automorphism of $\mathbb{F}_p^*$.
I was able to prove this result, by proving that this map must be injective (note that if $x \neq y$ and $x^3=y^3$, then $p|x^2+xy+y^2$ and using some quadratic reciprocity I was able to extract a contradiction), but my proof does not work for the general case. So, my question is:
Let $a$ be an integer and suppose $a$ does not divide $p-1$. Prove that the map $x \mapsto x^a$ is an automorphism of $\mathbb{F}_p^*$.
Call this map $f$. Then $f$ is an automorphism if and only if $\text{gcd}(a,p-1) = 1$.
Proof. If $\text{gcd}(a,p-1) = 1$, then there exists $x,y \in \mathbb{Z}$ such that $xa + y(p-1) = 1$. Now consider the map $g\colon k \mapsto k^x$, then this map is the inverse of the our map. Indeed, $f\circ g = g \circ f$ sends $k$ to $k^{xa} = k^{1-y(p-1)} = k$ because $k^{p-1} = 1$.
Now suppose that $\text{gcd}(a,p-1) = d >1$.Let $g$ be a generator. My claim is that $g$ is not in the image of $f$. If it would be, then $g = z^a$ for some $z \in \mathbb{F}_q^{\times}$. Write $a = dn$ and $z = g^k$. Then this would imply that $$g^{d(nk)-1} = 1$$ Which would imply that the order of $g$, $p-1$, would divide $d(nk)-1$, so $d$ would divide $d(nk)-1$, contradiction.
Remark: One can show that if $\text{gcd}(a,p-1) = d$, then $$\text{im}(f) = \langle g^d \rangle$$