Let $p>2$ be a prime, $(a,p)=1,$ and suppose that $a^k$ is a primitive root mod $p$ for some $k>0$. Prove that $a$ itself is a primitive root.
I looked at the definition of primitive root but I wasn't able to figure out a proof for this. Would really appreciate it if someone could construct one as I am very new to number theory. Many thanks.
Hint: Suppose $a$ were not a primitive root, so that there exists $n < p - 1$ such that $a^n \equiv 1 \pmod{p}$. Then, try to show that $(a^k)^n \equiv 1 \pmod{p}$, which would be a contradiction because $a^k$ is a primitive root modulo $p$.