Define a sequence recursively by and the remainder when is divided by for all Thus the sequence starts What is
- A)
- B)
- C)
- D)
- E)
Answer
D
Key insight
Fibonacci mod 3 repeats with period 8, so any eight consecutive terms are a full cycle and sum to 0+1+1+2+0+2+2+1 = 9.
Solution
Continue the sequence, reducing each sum mod :
After eight terms the pair reappears at . Since each term depends only on the previous two, the sequence repeats from there with period .
The requested sum has exactly eight consecutive terms, so it covers one full period, in some rotation. Its value is the sum of one period:
The answer is .
Why this works
A recursion taken mod has only finitely many possible states (here pairs), so it must cycle; you find the period by watching for the initial pair to return. Once the period is known, a sum over a block whose length is a multiple of the period does not depend on where the block starts, which is why the specific index never matters.
The trap
Stopping the pattern search too early (thinking the period is 4 after seeing 0,1,1,2,0) or computing 2017 mod 8 when it is not even needed.
Common mistakes
- Stopping the pattern search too early (thinking the period is 4 after seeing 0,1,1,2,0) or computing 2017 mod 8 when it is not even needed.
- Summing seven or nine terms because of an off-by-one count of the indices through .
Techniques
Compute small cases, spot the pattern, generalize