summaryrefslogtreecommitdiff
path: root/H34.hs
blob: 6db5e5d44e8e46a484710d2bf75149691cd32fe0 (plain)
1
2
3
-- http://en.wikipedia.org/wiki/Euler%27s_totient_function
totient :: Integral a => a -> Bool
totient x = length $ filter ((==1).(gcd x)) [1..x]