I'd really love your help with the following one: : Let $g$ a primitive element modulo $m$, $g^{\varphi(m)} \equiv 1\pmod{m}$. I need to prove that $g^k$ is a primitive element modulo $m$ iff $\gcd (k,\varphi(m))=1$.
First I tried to assume the left part, since $g^k$ is a primitive element so $g^k \equiv 1\pmod{m}$, so that $k \neq \varphi(m) $. so there is a $r$ such that $r| \varphi(m)$, $r|k$.
if $k=r$ so $\varphi(m)=kt$ for some $t$, $t < \varphi(m)$ so that $1 \equiv g^{\varphi(m)}=g^{kt}=(g^{k})^t$ so $g^k$ is not an primitive element. if $k \neq r$ so there are $a,b$ such that $\varphi(m)a+kb=r$ for $r\gt 1$, what can I do next?
I succeeded the other direction.
Thanks a lot