Is there a way to prove that
$$\phi (n) = n \prod_p\left(1-\frac{1}{p}\right)$$
using group theory?
For example, using the fact that
$$\left|\left(\frac{\mathbb{Z}}{n\mathbb{Z}}\right)^* \right| = \phi(n) $$
Is there a way to prove that
$$\phi (n) = n \prod_p\left(1-\frac{1}{p}\right)$$
using group theory?
For example, using the fact that
$$\left|\left(\frac{\mathbb{Z}}{n\mathbb{Z}}\right)^* \right| = \phi(n) $$
Factor $ n $ into primes, say $$ n=\prod_{i=1}^{k}p_i^{a_i} ,$$ by Chinese remainder theorem, $$ \mathbb{Z}/n\mathbb{Z}\cong\bigoplus_{i=1}^{k}\mathbb{Z}/p_i^{a_i}\mathbb{Z} .$$ So $$ \begin{align} (\mathbb{Z}/n\mathbb{Z})^{*}&=(\bigoplus_{i=1}^{k}\mathbb{Z}/p_i^{a_i}\mathbb{Z})^{*}\\&=\bigoplus_{i=1}^{k}(\mathbb{Z}/p_i^{a_i}\mathbb{Z})^{*} ,\end{align} $$ since the multiplication over the direct sum of rings is componentwise. Then $$\begin{align} |(\mathbb{Z}/n\mathbb{Z})^{*}|&=\prod_{i=1}^{k}|(\mathbb{Z}/p_i^{a_i}\mathbb{Z})^{*}|\\&=\prod_{i=1}^{k}(p_i^{a_i}-p_i^{a_i-1})\\&=\prod_{i=1}^{k}p_i^{a_i}(1-\frac{1}{p_i})\\&=n\prod_{i=1}^k(1-\frac{1}{p_i}) .\end{align}$$