I know this question has been asked many times, but I did not found a particular answer to my question. Assume $G$ is a group, $o(g) = n$ and $m \in \mathbb{Z}$. Then $$o(g^m) = \frac{n}{\gcd(m,n)}$$
I mean obviously $$(g^m)^{n/\gcd(m,n)} = (g^n)^{m/\gcd(m,n)} = 1$$ so $o(g^m)| n/\gcd(m,n)$. But how would I prove the equality?