Suppose that you have a large supply of red, white, green, and blue poker chips. You want to make a vertical stack of n chips in such a way that the stack does not contain any consecutive blue chips.
I've already found the recurrence relation for $a_{n}$ (where an denotes the number of ways you can make such a stack of n poker chips): $a_{n}=3a_{n-1}+3a_{n-2}$
But I am unsure of how to go about solving it. After solving it, I'm supposed to consider the specific case where you want to count only the stacks that use exactly 10 chips, and count $a_{10}$ directly.
Any help in the right direction is greatly appreciated!
Thanks for an interesting question.
The recurrence relation given in the question is not correct, albeit with only a sign error.
It should be; $$a_n=3a_{n-1}+3a_{n-2}$$ $$a_0=1 : a_1=4$$ This gives rise to the generating series, $$1+4x+15x^2+57x^3+216x^4+819x^5+\dots+169209x^9+641520x^{10}+2432187x^{11}+\dots$$ So, assuming the initial term is $a_0$, $a_{10}=641520$, which you asked for.
This generating series has generating function, $$\frac{1+x}{1-3x-3x^2}$$ Applying partial fractions to this gives, after some algebra, $$\frac{1+x}{1-3x-3x^2}=\frac{21-5 \sqrt{21}}{42 \big( 1-\frac{3-\sqrt{21}}{2}x \big)}+\frac{21+5 \sqrt{21}}{42 \big( 1-\frac{3+\sqrt{21}}{2}x \big)}$$ which are recognisable as standard bits directly translating into a formula for the $n^{th}$ term, $$T_n=\left( \frac{1}{2}-\frac{5 \sqrt {21}}{42} \right)\left( \frac{3 - \sqrt {21}}{2} \right)^n + \left( \frac{1}{2}+\frac{5 \sqrt {21}}{42} \right)\left( \frac{3 + \sqrt {21}}{2} \right)^n$$
Happy to elaborate on any of the detail if necessary.