Let $g\in G$ such that $o(g)=n<\infty$ (of a finite order). Show that $o(g^r)=\frac{n}{(n,r)}, 0<r<n$ where $(n,r)$ is gcd$(n,r)$.
First of all, it is quite easy to verify that $(g^r)^{\dfrac{n}{(n,r)}}=e$.
Then, let $s>0$ such that $g^{rs}=e$. To show that $o(g^r)=s$, we have to show that $s$ is the smallest integer such that $g^{rs}=e$. Clearly, $n$ must divide $rs$. My problem is how to show that $s=\frac{n}{(n,r)}$. I was told to use the prime number decomposition, but I don't really see how to get the desired result. If someone could help, I would really appreciate it. Thank you in advance.