In the Wikipedia page about the multiplicative groups modulo $m$, the following claim is made:
The group $(\mathbb{Z}/m\mathbb{Z})^*$ is cyclic if and only if $m=1, 2, 4, p^k$ or $2p^k$, where $p$ is an odd prime and $k > 0$.
No proof is provided. Could someone provide a proof of the above statement? Thanks
I already have a proof that if $m$ is an odd prime, then $(\mathbb{Z}/m^r\mathbb{Z})^*$ is cyclic if $m$ is an odd prime. assuming this, how do I prove the above?