prove that if $(\mathbb{Z}/n\mathbb{Z})^{*}$ is cyclic, $n=2,4$ or $p^k$, $2p^k$ where $p$ is an odd prime number.
I thought of looking at two cases: $n = \Pi p_i^{k_i}$, $n = \Pi 2 p_i^{k_i}$ with $p_i \neq p_j$ if $i \neq j$ and check why these fail to be cyclic.
We see obviously that for both cases $\phi(n) = \Pi (p^{k_i} - p^{k_i - 1})$. this number is even as well because the $p_i$ are odd. Further than this i haven't come.
Any tips and tricks? Am i going to the right direction or is there a better trick in doing this?