Show that $ \sum_{k=0}^{n} \binom{2n+1}{2k} 3^k $ is divisible by $2^n$

Let there be a string of $2n$ lights. Suppose that each light may be off or may shine in one of three colors, red, green, or blue, and that a string of lights is made to shine in a particular color by bracketing it with a pair of control blocks of that color. Suppose further that at most one control block may be inserted between two adjacent lights (also before the first light and after the last light). Note that control blocks are inserted in same-color pairs, with no control blocks in between, and that it follows from these rules that each string of shining lights must be followed by at least one off light (except at the end). Some examples are shown below.

|GG|O|G|O|B|

OOO|RR|OO|BBBB|O

There are $2n+1$ positions at which control blocks may be placed. There must be an even number, say $2k$, of control blocks, and there are $\binom{2n+1}{2k}$ ways of placing $2k$ control blocks. There are $3^k$ ways of choosing the colors of the $k$ pairs of adjacent control blocks. Therefore the total number of configurations for $2n$ lights is $$ \sum_{k=0}^n\binom{2n+1}{2k}3^k. $$

Now consider adding two lights at the right end of a string. If a configuration ends with a control block, there are four ways to extend the configuration,

...*| + OO

...*| + O|R|

...*| + O|G|

...*| + O|B|

where * stands for R, G, or B. One can also move the existing control block one or two units to the right,

...* + *|O

...* + **|

(All *s take the same value, R, G, or B.) So there are six ways to extend a configuration that ended in a control block.

If the configuration did not end in a control block, there are $10$ possibilities,

...O + OO

...O + |*|O

...O + |**|

...O + O|*|

where, again, * takes one of three values, R, G, B. Since every configuration of $2n$ lights gives rise to an even number of configurations of $2n+2$ lights, the number of configurations of $2n$ lights is divisible by $2^n$.


$$2S(n)=(1+\sqrt3)^{2n+1}+(1-\sqrt3)^{2n+1}=(4+2\sqrt3)^n(1+\sqrt3)+(4-2\sqrt3)^n(1-\sqrt3)$$

$$\implies S(m+2)-\{(4+2\sqrt3)+(4-2\sqrt3)\}S(m+1)+(4+2\sqrt3)(4-2\sqrt3)S(m)=0$$


My approach was to look at the values, see if I can find some pattern. First couple of values are $1,10,76,568,4240,\dots$. You can check that this is a sequence A107903, and it has known generating function $$ f(x)=\frac{1+2x}{1-8x+4x^2}. $$ Now from this you can easily derive recurrence formula by multiplying both sides by $(1-8x+4x^2)$ and comparing the coefficients (taking $f(x)=\sum a_nx^n$). By this method we get $$a_0=1,a_1=10$$ $$a_n=8a_{n-1}-4a_{n-2}$$ From this it is quite straight forward to prove the claim by induction.

Only thing that might be a little unclear is how to get that generating function in the first place, and I will think about that, but you could arrive at the recurrence by other means as well (such as assuming there is a linear recurrence and finding its coefficients).