Problem 258
A lagged Fibonacci sequence

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.

These problems are part of Project Euler and are licensed under CC BY-NC-SA 2.0 UK

http://projecteuler.net/problem=258