Number of $6$-digit numbers made up of the digits $1$, $2$, and $3$ with no digit occurring $3$ or more times consecutively? Find the number of 6-digit numbers made up of the digits $1$, $2$, and $3$ that have no digit occur three or more times consecutively. (For example, $123123$ would count, but $123111$ would not.)
We know the total number of possibilities without the occurrence restriction is $3^6 = 729$. 
In order to eliminate the possibilities that can't be used, I set a block of 3 numbers as my 3 consecutive digits block. This block would have 3 different combinations. I then split the number of eliminations into 2 cases: one where the block of 3 is in the front, and one where the block of 3 is in the middle. 
For case 1: I computed $3\cdot 24$, with $3$ being the ways to change the block of 3, and $24$ being the number of ways to change the other 3 numbers while not having another block of 3 consecutive. 
For case 2: I computed $3^4$, ignoring the restriction of case 1. 
Summing the 2 cases, I got $72+ 3\cdot 81 = 315$, I then subtracted from $729$ and got $414$, which turns out to be incorrect. What am I doing wrong?

Denote by $a_n$ the number of admissible words of length $n\geq1$. Then $a_1=3$, $a_2=9$. Furthermore we have the recursion
$$a_n=2a_{n-1}+2a_{n-2}\qquad(n\geq3)\ .\tag{1}$$
Proof. The last two letters of an admissible word $w$ of length $n$ are either different or equal. In the first case the word $w$ results from appending a letter to an admissible word $w'$ of length $n-1$ which is different from the last letter of $w'$. In the second case the word $w$ results from appending two equal letters to an admissible word $w''$ of length $n-2$ which are different from the last letter of $w''$. $\quad\square$
Given the initial conditions one can solve $(1)$ using the "Master Theorem". As only $a_6$ is required we can do the necessary steps by hand and arrive at $a_6=492$.
