1. nbFactors 1 _ = []
  2. nbFactors x (p:ps) = exponent : nbFactors rest ps where
  3.     (exponent,rest) = countClean 0 x
  4.     countClean e y = case divMod y p of
  5.         (y',0) -> countClean (e+1) y'    
  6.         _ -> (e,y)