Problem 28
p28 :: Integer -> Integer p28 limit = 1 + (sum $ concat $ map (\x -> p28' limit 1 x) [2,4,6,8]) where p28' limit a b = takeWhile (\x -> x <= limit) $ p28'' a b p28'' a b = (a+b) : p28'' (a+b) (b+8) 669171001
p28 :: Integer -> Integer p28 limit = 1 + (sum $ concat $ map (\x -> p28' limit 1 x) [2,4,6,8]) where p28' limit a b = takeWhile (\x -> x <= limit) $ p28'' a b p28'' a b = (a+b) : p28'' (a+b) (b+8) 669171001