2015 AMC 12A Problem 22
Problem 22 of 25HarderNumber TheoryCounting & Probability
For each positive integer let be the number of sequences of length consisting solely of the letters and with no more than three s in a row and no more than three s in a row. What is the remainder when is divided by
Answer choices
Show solution
Solution
Note Every valid sequence ends in a run of one, two, or three equal letters; removing that run leaves a valid sequence of length or Thus
Modulo the first terms are The next three terms are which reproduce the initial state, so the recurrence repeats with period Since it follows that
Modulo the terms repeat as because the next three-term state after these four terms is again Thus the period is As we have
Writing the condition gives so
Thus, the correct answer is D.