2015 AMC 12A 第 22 题

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

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

22.

对每个正整数 nn,令 S(n)S(n) 表示只由字母 AA 和 BB 组成、长度为 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
知识点:递推计数模运算中国剩余定理
小提示:
一个合法序列以长度为 11,22,或 33 的同字母段结尾,因此 S(n)=S(n−1)S(n) = S(n-1) +S(n−2)+ S(n-2) +S(n−3)+ S(n-3)
A valid sequence ends in a run of 1,1, 2,2, or 33 equal letters, giving S(n)=S(n−1)S(n) = S(n-1) +S(n−2)+ S(n-2) +S(n−3)+ S(n-3)
大提示:
分别模 33 和模 44 化简递推式以寻找周期
Reduce the recurrence modulo 33 and modulo 44 separately to find its period
解答:
注意 S(1)=2S(1) = 2,S(2)=4S(2) = 4,S(3)=8S(3) = 8。每个合法序列都以一段长度为一、二或三的同字母段结尾;去掉这段后,剩下长度为 n−1n-1,n−2n-2,或 n−3n-3 的合法序列。S(n)=S(n−1)+S(n−2)+S(n−3)。 \begin{aligned} &S(n) = S(n-1) + S(n-2) \\ &\quad {}+ S(n-3) \end{aligned}\text{。}
模 33 时,前 1313 项为 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\text{。}接下来的三项是 2,1,22,1,2,与初始状态相同,所以递推式以 1313 为周期重复。因为 2015=13⋅1552015 = 13\cdot 155,可得 S(2015)≡S(13)≡2(mod3)S(2015) \equiv S(13) \equiv 2 \pmod 3。
模 44 时,各项按 2,0,0,22,0,0,2 循环,因为这四项之后的三项状态又回到 (2,0,0)(2,0,0)。所以周期为 44。因为 2015=4⋅503+32015 = 4\cdot 503 + 3,所以 S(2015)≡S(3)≡0(mod4)S(2015) \equiv S(3) \equiv 0 \pmod 4。
写 S(2015)=4kS(2015) = 4k,条件 4k≡2(mod3)4k \equiv 2 \pmod 3 给出 k≡2(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 n−1,n-1, n−2,n-2, or n−3.n-3. Thus S(n)=S(n−1)+S(n−2)+S(n−3). \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=13⋅155,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=4⋅503+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 4k≡2(mod3)4k \equiv 2 \pmod 3 gives k≡2(mod3),k \equiv 2 \pmod 3, so S(2015)≡8(mod12).S(2015) \equiv 8 \pmod{12}.
Thus, the correct answer is D.
LIVE by Po-Shen Loh
LIVE项目

LIVE直播课程

Self-Paced录播课程

启明星Star计划

奖学金项目

关于我们

罗博深是谁?

邮件联系

订阅英文简报

加入我们

申请明星导师

For a more Thought Full world.

© 2026 Expii, Inc.