TITLE: Cyclic Group Generators of Order $n$
QUESTION [8 upvotes]: How many generators does a cyclic group of order $n$ have? I know that a cyclic group can be generated by just one element while using the operation of the group.  I am having trouble coming up with the generators of a group of order $n$.
Any help would be great!  Thanks!

REPLY [2 votes]: Let $G$ be a group of order $n$.
Let $g$ be a generator of $G$.
Then, $G = \{e, g, g^2, \cdots, g^{n-1}\}$.
If $h = g^i$ is a generator of $G$, then, $h^k = g^{k i} = g$ for some $k \in \mathbb{Z}$.
So, $g^{k i - 1} = e$.
So, $k i - 1 = (-l) n$ for some $l \in \mathbb{Z}$.
$\therefore k i + l n = 1$.
So, $gcd(i, n) = 1$.  
Conversely, if $\gcd(i, n) = 1$, then, there exist $k, l \in \mathbb{Z}$ such that $k i + l n = 1$.
$g = g^1 = g^{k i + l n} = g^{k i} (g^n)^l = g^{k i} e^l = g^{k i} e = g^{k i}$.
So, $g^i$ is a generator of $G$.  
$\therefore$ There exist $\#\{i \in \{0, 1, \cdots, n-1\} | \gcd(i, n) = 1\}$ generators in $G$.