1 vote

Let $a_n$ be the number of $X$-strings of length $n$ that do not contain $344$ as a sub-string. Find a recurrence relation for $a_n$.

As i said in the comment your answer goes wrong when $n\geq 4$ , so let me give you a tricky way to solve it. As you said all strings can end up with any of these $4$ letters and assume that these ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible