Suppose $U(n)$ is the multiplicative group of units of $\mathbb Z_n$. We know that $U(m)$ and $U(n)$ may be isomorphic even if $m\neq n$, for example $U(8)\cong U(12)$. So,
I am looking for a necessary and sufficient condition on $m,n\in \mathbb N$ for $U(m)\cong U(n)$.
Can someone provide me with such a condition? I am new in group theory and so I cannot think of a suitable condition. Can someone please help?
It's necessary that $\varphi(m)=\varphi(n)$. But it is not sufficient. For instance, $\varphi(21)=\varphi(13)$. But $U(21)\not\cong U(13)$. The latter is cyclic, the former is not.
At the moment, I'm not sure about a sufficient condition.