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.
Perhaps easier: if $g$ generates $G$, then so does $g^{-1}$. The hypothesis then implies that $g=g^{-1}$, so $g^2=1$. Done (either $g=1$ or not, in which case respectively the order of $G$ is $1$ or $2$).