foo [] = 0 foo (x:xs) = (if x `mod` 2 == 1 then x else 0) + foo xs
bar n = [ (i,j) | i <- [2..n], j <- [i..n], i * j <= n ]