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
The list repeats every 8 terms, so any 8 terms in a row make one full cycle, which adds up to 9.
Solution
Index is far too big to reach by hand, so look for a repeating pattern.
- Each new term is the sum of the two before it, then take the remainder after dividing by . Keep going from the start:
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | 1 | 2 | 0 | 2 | 2 | 1 | 0 | 1 |
For example, remainder of , and remainder of , which is .
2. At the pair appears again, exactly like . Each term depends only on the two before it, so from here the list repeats the same terms forever: .
3. The question adds terms in a row ( through ). Any terms in a row cover each spot of the cycle exactly once, just starting at a different place. So their sum is the sum of one full cycle:
The answer is .
Why this works
When each term is built from the two before it using remainders, there are only a few possible pairs, so the list must eventually repeat. Watch for the starting pair to come back; that gives the cycle length. A block of terms as long as the cycle always adds up to the same total, wherever it starts.
Alternative approach
If you want to check which terms these are: , so matches . The eight terms are then through in the cycle: , which add to .
The trap
Stopping the list too early and thinking it repeats every 4 terms, or doing extra work to find where 2017 lands in the cycle when it is not needed.
Concise 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 .
Review in the AoPS books
- Introduction to Number Theory, Chapter 12: Introduction to Modular Arithmetic
- Introduction to Algebra, Chapter 21: Sequences & Series (§21.1, §21.2, §21.3, §21.4)
- Prealgebra, Chapter 15: Problem-Solving Strategies (§15.1)
- Introduction to Number Theory, Chapter 10: Units Digits
Techniques
Compute small cases, spot the pattern, generalize