# $n$-digits numbers made of 1, 2, 3, such that none of two consecutive digits differ by more than one

We call a number to be good if none of two consecutive digits differ by more than one. How many good $n$-digits numbers made from digits $1$, $2$ and $3$ are there?

For example, $12232$ is good, but $12\textbf{31}2$ isn't.

My idea was to subtract bad numbers made of $1$, $2$ and $3$ (bad numbers are ones that aren't good) from $3^n$ (which represents number of $n$-digit numbers made of $1$, $2$ and $3$).

-