I always have some difficulty with problems of this type, and I was wondering if there was a typical trick that makes it reasonable. 

Let $W\_n$ be the number of words of length $n$ formed with the letters $A$ and $B$ such that

* There are no words that contain sequences of $A$s with length exactly 2
* There are no words that contain sequences of $B$s with length exactly 2 or 3.

Examples of words: $AAAB, ABABABA, ABBBBAAABA$, and of non-words: $AAB, ABBBA$, etc.

These "recursion with constraints" type problems always cause me difficulty. I want to write $W\_n = f(W\_{n-1}, W\_{n-2}, \ldots, W\_{n-k})$ for some fixed $k$. I tried to break it into cases based on what the last letter is, so $W\_n = A\_n + B\_n$ where $A\_n$ is the number of words of length $n$ that end in $A$ and $B\_n$ defined similarly. Then getting recursive definitions for $A\_n$ in terms of some $B\_{n-k\_i}$ and $W\_{n-k\_j}$ and likewise recursive definitions for $B\_n$ produces a whole mess of terms that don't cancel even when you get these $W\_{n-11}$ terms showing up. Surely I'm missing the trick?