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.