Update Dec. 28 2013. See a stronger result and easier proof here. I didn't find it until after I posted this. This isn't a duplicate. Proof is based on ProofWiki. But I leave out the redundant $a$.
Let $\color{magenta}{\langle {g} \rangle \text{ be the cyclic group of order } n}$ generated by $g$. Let $g^i \in \langle {g} \rangle$. Then $\left|{\langle {g^i} \rangle }\right| = \frac n {\gcd \left\{{n, i}\right\}}$.
Proof: Subgroup of Cyclic Group is Cyclic says $\langle {g^i} \rangle$ is cyclic.
We need to show that $\langle {g^i} \rangle$ has $n / gcd(n, i)$ elements.
Let $\left|{\langle {g^i} \rangle}\right| = k$.
Hence by Non-Trivial Group has Non-Trivial Cyclic Subgroup, $(g^i)^k = e$. Hence $ (g^i)^k = e \color{magenta}{ = g^n}$.
Pinter p. 104 Theorem 5 says
Hence $\color{magenta}{n} | ik$.
We now need to calculate the smallest $k$ such that $n \mathop \backslash i k$.
That is, the smallest $t \in \mathbb{N}$ such that $n t = i k$.
Thus $t = \dfrac{ik}{n} = \dfrac {ik\color{blue}{{\dfrac{1}{gcd(n, i)}}}}{n\color{blue}{\dfrac{1}{gcd(n, i)}}} = k\dfrac {{\dfrac{i}{gcd(n, i)}}}{\dfrac{n}{gcd(n, i)}}$
From Divide by GCD for Coprime Integers, $\frac{n}{gcd(n, i)}$ and $\frac{i}{gcd(n, i)}$ are coprime.
Thus from Euclid's Lemma, $\frac{n}{gcd(n, i)} \mathop \backslash k$.
For all $a,b, a \mathop \backslash b \implies a \le b$. Hence the smallest $k$ such that $k/{\frac{n}{gcd(n, i)}} \in \mathbb{Z}$ is $n / d$.
How do you envisage and envision $\left|{\langle {g^i} \rangle }\right| = \frac n {\gcd \left\{{n, i}\right\}}$ before doing the proof?
Why do we need to calculate the smallest $k$ such that $n \mathop \backslash i k$?
- How do you envisage and envision to multiply top and bottom by $\color{blue}{\frac{1}{gcd(n, i)}}$? Magic?
- The last line talks about smallest $k$ such that $k/{\frac{n}{gcd(n, i)}}$. Why do we need this?
And how can you envisage and envision we needed this?