Let $ n \in \mathbb{N} $ have prime factorization $ n = 2^e p_1^{e_1}...p_r^{e_r}, $
with $ 0 \leq e $ and pairwise odd primes $ p_1,...,p_r $
and $ 1 \leq e_1,...,e_r. $
How do you prove that the group $ ( \mathbb{Z} / n \mathbb{Z})^* $ then has
$ \left\{ \begin{array} {ll} 2^r-1, \text{ if } e=0 \lor 1 \\ 2^{r+1} -1 , \text{ if } e=2 \\ 2^{r+2} -1 , \text{ if }3 \leq e \end{array} \right.$
elements of order $2$?
Appreciate any help, because I am not really sure how to prove that !