Why is $\prod_{k = 1}^t p_k^{\alpha_k - 1}(p_k-1) = n \prod_{p\mid n} \left(1 - \frac {1}{p} \right)$?

Solution 1:

It's a product, so you can take out a factor of $n$ as a product of primes. Then, by definition, the $p_k$ are the $p|n$.

$$\begin{align} \prod_{k = 1}^t p_k^{\alpha_k - 1}(p_k-1)& = \prod_{k = 1}^t p_k^{\alpha_k}\left(1 - \frac {1}{p_k} \right)\\ & = \left(\prod_{k = 1}^t p_k^{\alpha_k}\right)\prod_{k = 1}^t\left(1 - \frac {1}{p_k} \right) \\ &= n \prod_{p|n} \left(1 - \frac {1}{p} \right) \end{align}$$