Recursive combinatorial solution for number of sequences of {0,1,2,3} how do i solve this recursive question:
In how many sequences of length n that are made of the numbers{0,1,2,3} there are without the substrings 00,11,22,33,03,30
i need a recursive answer,
can someone help me resolve this question and give me some example?
thanks!

Hint:  Let $a_n$ be the number of sequences (usually called words) from $\{0,1,2,3\}$, with the named exclusions.  Let $w$ be such a word of length $n$.  The last digit is either $0$, $1$, $2$, or $3$.  


*

*If the last digit is $0$, the next-to-last digit cannot be $0$ or $3$, because sequences of $00$ or $30$ are not allowed.  But it could be $1$ or $2$.  The $n-2$ digits before constitute an admissible word of length $n-2$.  So there are $2 a_{n-2}$ words of length $n$ that end in $0$.

*continue... 
