Let $h_n$ be the number of ways to tile a $1 \times n$ rectangle with $1 \times 1$ tiles that are red or blue and $1 \times 2$ tiles that are green, yellow, or white. Find a closed formula for $$H(x)=\sum_{n\geq0}h_nx^n.$$
I am unsure how to start this problem. Is there a way to solve this without using recurrence relations?
A recurrence relation is a good place to start. By considering the possibilities for the first tile, we obtain $$h_n=2h_{n-1}+3h_{n-2}$$ for $n \ge 2$. The boundary conditions are $h_0=1$ and $h_1=2$. Now the recurrence relation and boundary conditions yield $$ H(x)-1-2x = 2 x (H(x)-1) + 3x^2 H(x), $$ from which we find that $$ H(x) = \frac{1}{1-2x-3x^2}. $$ Partial fraction decomposition then yields $$H(x)=\frac{1/4}{1+x}+\frac{3/4}{1-3x},$$ which immediately implies the explicit formula $$h_n=\frac{1}{4}(-1)^n+\frac{3}{4}\cdot 3^n=\frac{(-1)^n+3^{n+1}}{4}.$$