# When is $(\Bbb Z/n\Bbb Z)^\times$ cyclic? [duplicate]

Is the group of units $(\Bbb Z/n\Bbb Z)^\times$ always cyclic? Do we need that $n$ is a prime or something?

## marked as duplicate by anomaly, Strants, hardmath, awllower, Henning MakholmJul 24 '16 at 15:00

• Because of $(\Bbb Z/n\Bbb Z)^*$ has divisor of zero if and only if $n$ is composed, this group is cyclic if and only if $n$ is prime. – Piquito Jul 24 '16 at 14:56
• @Piquito: $(\mathbb{Z}/n\mathbb{Z})^*$ is a group, not a ring; it has no zero divisors. – anomaly Jul 24 '16 at 14:57
• @Piquito what about $(\mathbb Z/4\mathbb Z)^* \cong \mathbb Z/2\mathbb Z$ ? – cat Jul 24 '16 at 15:17
• @Piquito That is false. The group $\;\left(\Bbb Z/n\Bbb Z\right)^*\;$ is cyclic iff $\;n=1,2,4,p^k, 2p^k\;$ , with $\;p\;$ an odd prime, $\;k\in\Bbb N\;$ – DonAntonio Jul 24 '16 at 15:25
• How hard is that to prove, @DonAntonio ? Do you care to sketch a proof for me? Could you give me a reference? – MyNameIs Jul 24 '16 at 15:59

It is cyclic for $n=4$ and for $n=p^k$ with $p$ an odd prime, $k\geq1$. (read books on number theory, e.g. Ireland and Rosen.)
For $n=8$ check that the unit group consists of $\{1,3,5,7\}$ with operation being multiplication mod $8$. Each number is its own inverse and hence no element of order 4 in this group (So this is isomorphic to Klein's group).
• ...and for $\;n=1,2, p^k\;$ , with $\;p\;$ an odd integer and $\;k\in\Bbb N\;$ . – DonAntonio Jul 24 '16 at 15:26
• That should have been $\;n=1,2,2p^k\;,\;\;k\in\Bbb N\;$ . My pleasure. – DonAntonio Jul 24 '16 at 15:38