The function _perfects_ isn't correct. It should be `perfects n = [x | x <- [1..n],sum (fac x) - x == x]`.