Problem

Source: Romanian TST 1998

Tags: function, symmetry, combinatorics proposed, combinatorics



A word of length $n$ is an ordered sequence $x_1x_2\ldots x_n$ where $x_i$ is a letter from the set $\{ a,b,c \}$. Denote by $A_n$ the set of words of length $n$ which do not contain any block $x_ix_{i+1}, i=1,2,\ldots ,n-1,$ of the form $aa$ or $bb$ and by $B_n$ the set of words of length $n$ in which none of the subsequences $x_ix_{i+1}x_{i+2}, i=1,2,\ldots n-2,$ contains all the letters $a,b,c$. Prove that $|B_{n+1}|=3|A_n|$. Vasile Pop