A lagged Fibonacci sequence
October 03, 2009
A sequence is defined as:
- gk = 1, for 0 ≤ k ≤ 1999
- gk = gk-2000 + gk-1999, for k ≥ 2000.
Find gk mod 20092010 for k = 1018.
Written by gamwe6 who lives and works in San Francisco building useful things. You should follow him on Twitter