TITLE: Prove that a cyclic group with only one generator can have at most 2 elements
QUESTION [13 upvotes]: Prove that a cyclic group that has only one generator has at most $2$ elements.

I want to know if my proof would be valid: 
Suppose $G$ is a cyclic group and $g$ is its only generator. Let $|G|=n$ where $n>2$, then we know that $\gcd(n,n-1)=1$. This implies that $g^{n-1}$ is a generator of $G$. We have a contradiction, since $g$ is the only generator of $G$ (and $n > 2$ leads to $n-1 \neq 1$). Thus $|G|\leq 2$.
I tried to use the fact that generating elements of a group are coprime to the order of the group, thanks.

REPLY [9 votes]: Your proof is correct if $G$ is finite, i.e. $G\cong\mathbb{Z}_m$ for some $m\ge 1$. Just notice that it may happen that $G\cong\mathbb{Z}$; however, in this case $g$ and $g^{-1}$ are distinct generators and this concludes the proof.