2015 AMC 12A 第 22 题

先试着解答 2015 AMC 12A 第 22 题,然后核对你的答案与精心整理的解答,解答来自 LIVE by Po-Shen Loh。你也可以参加完整限时模拟考试、查看全部 2015 AMC 12A 解答,或核对答案

所有题目均经美国数学协会(MAA)官方合法授权使用。

22.

对每个正整数 nn,令 S(n)S(n) 表示只由字母 AABB 组成、长度为 nn 的序列数,其中连续的 AA 不超过三个,连续的 BB 也不超过三个。S(2015)S(2015) 除以 1212 的余数是多少?

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

答案:D
知识点:递推计数模运算中国剩余定理
难度评级:2270
解答:

注意 S(1)=2S(1) = 2S(2)=4S(2) = 4S(3)=8S(3) = 8。 每个合法序列都以一段长度为一、二或三的同字母段结尾; 去掉这段后,剩下长度为 n1n-1n2n-2, 或 n3n-3 的合法序列。 S(n)=S(n1)+S(n2)+S(n3). \begin{aligned} &S(n) = S(n-1) + S(n-2) \\ &\quad {}+ S(n-3). \end{aligned}

因此 模 33 时,序列 2,1,22,1,2 的周期为 1313。 因为 2015=131552015 = 13\cdot 155S(2015)S(13)2(mod3)S(2015) \equiv S(13) \equiv 2 \pmod 313132,1,2,2,2,0,1,0,1,2,0,0,2.2,1,2,2,2,0,1,0,1,2,0,0,2.

44 时,它的周期为 44,且 2015=4503+32015 = 4\cdot 503 + 3, 所以 S(2015)S(3)0(mod4)S(2015) \equiv S(3) \equiv 0 \pmod 42,0,0,22,0,0,2(2,0,0)(2,0,0)

S(2015)=4kS(2015) = 4k, 条件 4k2(mod3)4k \equiv 2 \pmod 3 给出 k2(mod3)k \equiv 2 \pmod 3, 因此 S(2015)8(mod12)S(2015) \equiv 8 \pmod{12}

因此,正确答案是 D

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). \begin{aligned} &S(n) = S(n-1) + S(n-2) \\ &\quad {}+ S(n-3). \end{aligned}

Modulo 3,3, the first 1313 terms are 2,1,2,2,2,0,1,0,1,2,0,0,2.2,1,2,2,2,0,1,0,1,2,0,0,2. The next three terms are 2,1,2,2,1,2, which reproduce the initial state, so the recurrence repeats with period 13.13. Since 2015=13155,2015 = 13\cdot 155, it follows that S(2015)S(13)2(mod3).S(2015) \equiv S(13) \equiv 2 \pmod 3.

Modulo 4,4, the terms repeat as 2,0,0,2,2,0,0,2, because the next three-term state after these four terms is again (2,0,0).(2,0,0). Thus the period is 4.4. As 2015=4503+3,2015 = 4\cdot 503 + 3, we have 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.

← 第 21 题#21
完整试卷

其他年份的第 22 题