Difference between revisions of "2015 AMC 12A Problems/Problem 22"
(→Problem) |
Tigershark22 (talk | contribs) (→Solution) |
||
Line 15: | Line 15: | ||
We can thus begin calculating values of <math>A(n)</math>. We see that the sequence goes (starting from <math>A(0) = 1</math>): <math>1,1,2,4,7,13,24...</math> | We can thus begin calculating values of <math>A(n)</math>. We see that the sequence goes (starting from <math>A(0) = 1</math>): <math>1,1,2,4,7,13,24...</math> | ||
− | A problem arises though: the values of <math>A(n)</math> increase at an exponential rate. Notice however, that we need only find <math>S(2015)\ \text{mod}\ 12</math>. In fact, we can | + | A problem arises though: the values of <math>A(n)</math> increase at an exponential rate. Notice however, that we need only find <math>S(2015)\ \text{mod}\ 12</math>. In fact, we can use the fact that <math>S(n) = 2A(n)</math> to only need to find <math>A(2015)\ \text{mod}\ 6</math>. Going one step further, we need only find <math>A(2015)\ \text{mod}\ 2</math> and <math>A(2015)\ \text{mod}\ 3</math> to find <math>A(2015)\ \text{mod}\ 6</math>. |
Here are the values of <math>A(n)\ \text{mod}\ 2</math>, starting with <math>A(0)</math>: <cmath>1,1,0,0,1,1,0,0...</cmath> | Here are the values of <math>A(n)\ \text{mod}\ 2</math>, starting with <math>A(0)</math>: <cmath>1,1,0,0,1,1,0,0...</cmath> |
Revision as of 23:58, 5 February 2017
Problem
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 ?
Solution
One method of approach is to find a recurrence for .
Let us define as the number of sequences of length ending with an , and as the number of sequences of length ending in . Note that and , so .
For a sequence of length ending in , it must be a string of s appended onto a sequence ending in of length . So we have the recurrence:
We can thus begin calculating values of . We see that the sequence goes (starting from ):
A problem arises though: the values of increase at an exponential rate. Notice however, that we need only find . In fact, we can use the fact that to only need to find . Going one step further, we need only find and to find .
Here are the values of , starting with :
Since the period is and , .
Similarly, here are the values of , starting with :
Since the period is and , .
Knowing that and , we see that , and . Hence, the answer is .
See Also
2015 AMC 12A (Problems • Answer Key • Resources) | |
Preceded by Problem 21 |
Followed by Problem 23 |
1 • 2 • 3 • 4 • 5 • 6 • 7 • 8 • 9 • 10 • 11 • 12 • 13 • 14 • 15 • 16 • 17 • 18 • 19 • 20 • 21 • 22 • 23 • 24 • 25 | |
All AMC 12 Problems and Solutions |