Let $p$ be a prime, $g\in (\mathbb{Z}/ p\mathbb{Z})$* a primitive root.
I want to find a necessary and sufficient condition on $a\in \mathbb{Z}$ such that $g^a$ is also a primitive root.
My conjecture is that $gcd(a,p-1)=1$ is that condition. To test this, I first suppose that $gcd(a,p-1)=1$. If I get that $g^a$ is a primitive root, then my condition is sufficient. Then I suppose $gcd(a,p-1)=d$ where $d>1$ and in $\mathbb{N}$. If I get that $g^a$ is not a primitive root, then my condition is necessary.
First, I suppose $gcd(a,p-1)=1$ By the definition of a primitive root, we have $g^{p-1}\equiv 1\pmod p$ with $p-1$ the smallest integer for which the latter congruence is true. This implies $(g^{p-1})^a\equiv 1\pmod p$ and $(g^a)^{p-1}\equiv 1\pmod p$
If $p-1$ is the multiplicative order of $g^a$, we're done.
If $p-1$ is not the multiplicative order of $g^a$, then $\exists\space d\in \mathbb{N}$ such that $d|p-1$ and $\frac{p-1}{d}$ is the multiplicative order of $g^a$.
So we get $(g^a)^{\frac{p-1}{d}}\equiv 1\pmod p$ which implies $(g^{\frac{a}{d}})^{p-1}\equiv 1\pmod p$
I expected to arrive at some contradiction because $a$ and $p-1$ being coprime, it implies that $d$ does not divide $a$ but I'm not sure where the contradiction lies or if there is any. Any tips?