Let $a_n$ be the number of bricks in a path that is $n \geq 1$ long. We have 3 types of bricks:
- Blue: $2$ cm long
- Red: $3$ cm long
- Green: $1$ cm long
When a blue brick can't be placed next to a green brick.
I was trying to work this out but I'm getting into an endless loop, I know that after a red brick we have $a_{n-3}$ legal paths, but I can't go any further because both colors are getting me into the loop.
Hint: Let $b_n$ be the number of paths that are $n$ long and end with blue, $g_n$ that end with green, $r_n$ that end with red. Then $a_n=b_n+g_n+r_n$. You should be able to find a coupled set of recurrences. For example, $r_n=g_{n-3}+r_{n-3}+b_{n-3}=a_{n-3}$ as you say.