Find the recurrence relation for how many ways there are to color a carousel with a circumference of length $n$ with two colors, red and blue such that no two reds will be adjacent
This is like asking about a string of $A,B$ of length $n$ without $AA$ and it can't start and end with $A$.
So: $a_n=\begin{cases} AB\text{____}B = a_{n-3} \\ B\text{______}= a_{n-1} \end {cases}$
$a_n=a_{n-1}+a_{n-3} \\a_1 = 2, a_2 = 3, a_3 =4 $
For $a_3$ these aren't allowed: $\{AAA, AAB, BAA, ABA\}$ so $2^3-4=4$
Can I do this with the beginning and end of the sequence?
ABABBBAB
get counted? OrBABBA
? $\endgroup$ABABBBAB
is in the first case andBABBA
is in the second case no? @HenningMakholm $\endgroup$ABBBA
isn't supposed to be counted here I think. $\endgroup$ABBBA
is a subsequence ofABABBBAB
. $\endgroup$ABBBA
is the subsequence you need to insert inAB___B
to makeABABBBAB
. $\endgroup$