P37: Calculate Euler's totient function phi(m) (improved).