This seems a little inconvenient, and using
$$\phi(n)=\prod_{p|n} \left ( p-1 \right )$$
seems much more convenient for computational purposes.
So I am guessing that there is a specific reason for expressing it as such. What is that reason?
This seems a little inconvenient, and using
$$\phi(n)=\prod_{p|n} \left ( p-1 \right )$$
seems much more convenient for computational purposes.
So I am guessing that there is a specific reason for expressing it as such. What is that reason?
Copyright © 2021 JogjaFile Inc.
The formula
$$\phi(n) = \prod_{p \mid n} (p-1)$$
is correct for squarefree $n$, but incorrect otherwise. Generally correct is
$$\phi(n) = \prod_{p \mid n} (p-1)\cdot p^{v_p(n) - 1},$$
where $v_p(n)$ is the exponent of $p$ in the prime factorisation of $n$. But in comparison to that,
$$\phi(n) = n \prod_{p \mid n} \bigl(1 - \tfrac{1}{p}\bigr)$$
is more convenient.