Find a recurrence relation for $a_n$, the number of sequences of red, white and yellow flags along an $n$-foot high flagpole if red flags are 1, white flags are 2 and yellow flags are 3 feet tall, and no two red flags can be side-by-side.
Why is the answer $a_n=a_{n-2}+2a_{n-3}+a_{n-4}$? How does that incorporate the last restriction?