JavaScript:实现EulersTotient欧拉方程算法
/*
EulersTotient(n) = n * product(1 - 1/p for all prime p dividing n)
Complexity:
O(sqrt(n))
*/
export const EulersTotient = (n) => {
// input: n: int
// output: phi(n): count of numbers b/w 1 and n that are coprime to n