2015 AMC 12A Problem 22

Below is the professionally curated solution for Problem 22 of the 2015 AMC 12A, from LIVE by Po-Shen Loh. You can also try the full timed exam, view all 2015 AMC 12A solutions, or check the answer key.

All of the real AMC 8, AMC 10, AMC 12, and AIME problems in our complete solution collection are used with official legal permission of the Mathematical Association of America (MAA).

Concepts:recursive countingmodular arithmeticChinese Remainder Theorem

Difficulty rating: 2270

22.

For each positive integer n,n, let S(n)S(n) be the number of sequences of length nn consisting solely of the letters AA and B,B, with no more than three AAs in a row and no more than three BBs in a row. What is the remainder when S(2015)S(2015) is divided by 12?12?

00

44

66

88

1010

Solution:

Note S(1)=2,S(1) = 2, S(2)=4,S(2) = 4, S(3)=8.S(3) = 8. Every valid sequence ends in a run of one, two, or three equal letters; removing that run leaves a valid sequence of length n1,n-1, n2,n-2, or n3.n-3. Thus S(n)=S(n1)+S(n2)+S(n3).S(n) = S(n-1) + S(n-2) + S(n-3).

Modulo 3,3, the sequence S(n)S(n) is periodic with period 13.13. Since 2015=13155,2015 = 13\cdot 155, S(2015)S(13)2(mod3).S(2015) \equiv S(13) \equiv 2 \pmod 3. Modulo 4,4, it is periodic with period 4,4, and 2015=4503+3,2015 = 4\cdot 503 + 3, so S(2015)S(3)0(mod4).S(2015) \equiv S(3) \equiv 0 \pmod 4.

Writing S(2015)=4k,S(2015) = 4k, the condition 4k2(mod3)4k \equiv 2 \pmod 3 gives k2(mod3),k \equiv 2 \pmod 3, so S(2015)8(mod12).S(2015) \equiv 8 \pmod{12}.

Thus, the correct answer is D.

Problem 22 in Other Years