A function is defined recursively by and for all integers . What is ?
- A)
- B)
- C)
- D)
- E)
Answer
B
Key insight
Adding consecutive recursions gives f(n) = f(n-6) + 6, so f(2018) = f(2) + 6 * 336 = 2017.
Solution
Write the recursion for and for :
Adding them cancels and :
Apply this twice: , so
So stepping the index by raises by exactly . Since ,
The answer is .
Why this works
The homogeneous part has period (its characteristic roots are sixth roots of unity), and the forcing adds a linear drift; combining the two gives "shift by 6, add 6." Whenever a recurrence has a small period, look for a relation between and and reduce the target index modulo the period.
Alternative approach
Compute directly: . The differences are repeating with period . Since , .
The trap
Computing a few terms, spotting a pattern in the wrong place, and concluding f(n) = n or n + 1 for all n; the offset f(n) - n cycles with period 6 and depends on n mod 6.
Common mistakes
- Computing a few terms, spotting a pattern in the wrong place, and concluding f(n) = n or n + 1 for all n; the offset f(n) - n cycles with period 6 and depends on n mod 6.
- Reducing modulo incorrectly (it is , not ) and reading off the wrong offset.
Techniques
Compute small cases, spot the pattern, generalize · Collapse a sum or product by cancellation