Classification of natural numbers for which the multiplicative group is cyclic

Statement
Let $$n$$ be a natural number greater than $$1$$. Then, the fact about::multiplicative group modulo n is a cyclic group if and only if $$n$$ is $$2,4$$ or of the form $$p^k$$ or $$2p^k$$ for some odd prime $$p$$.

Caution
Note that the multiplicative group modulo $$p^k$$ is a totally different concept from the multiplicative group of a finite field of order $$p^k$$. The former arises as the multiplicative group of a ring that is far from a field, while the latter is the multiplicative group of a finite field. When $$k = 1$$, the notions coincide.

Also, the multiplicative group of a finite field is always cyclic, even when the prime is $$2$$.

Related facts

 * Multiplicative group of a prime field is cyclic
 * Multiplicative group of a finite field is cyclic
 * Multiplicative group of a field implies every finite subgroup is cyclic
 * Classification of fields whose multiplicative group is locally cyclic

Examples
For examples of prime numbers, refer Multiplicative group of a prime field is cyclic.

Here, we discuss examples of prime powers.

$$n = 2^2 = 4$$
In this case, the multiplicative group is $$\{1,3 \}$$, and is cyclic on $$3$$.

$$n = 3^2 = 9$$
In this case, the multiplicative group is $$\{ 1,2,4,5,7,8 \}$$, and it has two possible generators: $$2$$ and $$5$$.