Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import qualified Data.MemoCombinators as Memo
- f = Memo.integral f'
- where f' :: Int -> Int
- f' 1 = 1
- f' n = (length . filter (== '1') . show) n + f (n-1)
- main = (print . head . filter (uncurry (==))) $ zip [2..] $ map f [2..]
Add Comment
Please, Sign In to add comment