Structure of $Z/nZ$ I am trying to improve my understanding of structure of $Z/nZ$.
Facts I know so far:


*

*$Z/nZ \cong \oplus_i Z/p_i^{k_i}$ - CRT(1).

*$(Z/nZ)^* \cong \oplus_i (Z/p_i^{k_i})^*$. Not quite sure about my proof of this fact.(2)

Proof: We have $Z/nZ \cong \oplus_i Z/p_i^{k_i}$ and its isomorphism $\phi$ : $r \to (r_1, \dotso, r_m)$. Since homomorphism preserves inverses then $r^* \to (r_1^*, \dotso, r_n^*)$, where each $r_i$ must be a unit. Hence, every $r^*$ has its own unique (because of CRT isomorphism) inverse element.


*$(Z/pZ)^*$ is cyclic of order $p - 1$. I don't understand this at all. Why its order is $p - 1$ and why it is cyclic?(3)

*From previous statement we know $(Z/pZ)^*$ is cyclic: $(Z/p^{k}Z)^* = C_{p^{k} \ (p - 1)}$ , since $\phi(p^k) = p^{k}\cdot (p - 1)$.(4) 
There is also a special case, when $p = 2$. 
$(Z/2^{k}Z)^* = C_2 \times C_{2^{k - 2}}$ . It can be proven using the fact $ord\left<-1\right> = 2$, $ord\left<5\right> = 2^{k - 2}$ and $\left<5\right> \cap \left<-1\right> = {e}$.
From these facts I can conclude:


*

*$(Z/pZ)^* \cong C_{p_2^{k_2} \ (p_2 - 1)} \times \dotso \times C_{p_n ^{k _ n} \ (p_n - 1)}\ \text{, if } (n \mod 2 =  0) \land (n \mod 4 \neq 0) \text{ note that in this case } C_{p_1 ^{k _ 1} \ (p_1 - 1)} = C_1 \text{ ,so the first term cancels out.}
$.

*$(Z/pZ)^* \cong C_2 \times C_{2^{k_1 - 2}} \times C_{p_2 ^{k _ 2} \ (p_2 - 1)} \times \dotso \times C_{p_n ^{k _ n} \ (p_n - 1)}$, since $(Z/2^{k}Z)^* = C_2 \times C_{2^{k - 2}}$, when $(n \mod 8 = 0)$

*$(Z/pZ)^* \cong C_{p_1^{k_1} \ (p_1 - 1)} \times \dotso \times C_{p_n ^{k _ n} \ (p_n - 1)}$ , when $(n \mod 2 \neq 0) \ \lor ((n \mod 8 \neq 0) \land (n \mod 4 = 0)) $, because of (2).
My questions are:
Can you please verify my conclusion?
Why $(Z/pZ)^*$ is cyclic of order $p - 1$?
How we can prove the fact: $(Z/pZ)^*$ is cyclic $\Rightarrow n = 2, 4, p^k, 2p^k$?
 A: Why $(\Bbb Z/p\Bbb Z)^∗$ is cyclic of order $p−1$?
It should be clear that $p$ is prime.
First of all note that $\Bbb Z/p\Bbb Z$ is a field, so every nonzero element is inverible. Let $k < p-1$ be the maximal order of the elements of $\Bbb Z/p\Bbb Z^*$. Then $\forall a \in \Bbb Z/p\Bbb Z^* : a^k = 1 $. But this means that the polynomial $x^k-1$ of degree $k$ has $p-1 >k$ distinct roots, a contradiction, so $k = p-1$. So there is an element $a$ of order $p-1$. Such an element is called a primitive root.
How we can prove the fact: $\Bbb Z/p\Bbb Z$ is cyclic $\implies $ $n=2,4,p^k,2p^k$?
This question is rather ambiguous. I suppose that you ask for a proof that $\Bbb Z/n\Bbb Z$ is cyclic for $n=2,4,p^k,2p^k$ for an odd prime $p$.
The cases 2 and 4 are easily proved by hand. In the case $n=p^k$ we have the following : If $a \in \Bbb Z_n^*$ (a simpler way of writing $\Bbb Z/n\Bbb Z^*$) is a primitive root of $\Bbb Z_p$ then either $a$ or $a+p$ is a primitive root of $\Bbb Z_{p^2}$, and if $a$ is a primitive root of $\Bbb Z_{p^2}$ then $a$ is a primitive root of $\Bbb Z_{p^k}$ for $k >2$. You can find these proofs here.
