 - 1) * (a - 1) * b ^ (j - 1) * (b - 1) * ...
--
phi :: Integral a => a -> a
phi n = product [p^(i - 1) * (p - 1) | (p, i) <- fac
isInteger :: RealFrac a => a -> Bool
isInteger = (== 0) . snd . properFraction
isInteger = (== 0) . snd . properFraction