Question 26
Consider a sequence of letters where each letter is A or B. We call the sequence stable if, when we tally the number of As and the number of Bs in the sequence, working from left to right, the difference is never greater than one. For example, the sequence ABBABA is stable but the sequence AABBAB is not, because after counting the first two letters, the difference is two. How many stable sequences with eighteen letters are there?