(Lucas Numbers) The Lucas numbers are defined by , and for every . There are integers such that contains the digit 1 . Estimate .
Solution
```
Answer: 1984
lucas_ones n = length . filter (elem '1') $ take (n + 1) lucas_strs
where
lucas = 2 : 1 : zipWith (+) lucas (tail lucas)
lucas_strs = map show lucas
main = putStrLn . show $ lucas_ones 2016
```
Want a route through all this instead of an archive? The track
puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.