MathDB
No More than Three Letters in a Row

Source: 2015 AMC 12A #22

February 4, 2015
functionAMC

Problem Statement

For each positive integer nn, let S(n)S(n) be the number of sequences of length nn consisting solely of the letters AA and BB, 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 1212?
<spanclass=latexbold>(A)</span>0<spanclass=latexbold>(B)</span>4<spanclass=latexbold>(C)</span>6<spanclass=latexbold>(D)</span>8<spanclass=latexbold>(E)</span>10<span class='latex-bold'>(A) </span>0\qquad<span class='latex-bold'>(B) </span>4\qquad<span class='latex-bold'>(C) </span>6\qquad<span class='latex-bold'>(D) </span>8\qquad<span class='latex-bold'>(E) </span>10