Prove that $3^n - 4(2^n) + (-1)^n + 6 \equiv 0 \mod 24 $ Is it possible to prove that $3^n - 4(2^n) + (-1)^n + 6 \equiv 0 \mod 24 $ for $n \geq 1 $ . I know that it is true because $ \frac{3^n - 4(2^n) + (-1)^n + 6}{24}$ represents the number of ways to uniquely $4$-colour an n-cycle , excluding permutations of colours.   

Let $x_n = 3^n - 4(2^n) + (-1)^n$. By expanding $(x-3)(x-2)(x+1)=x^3 - 4 x^2 + x + 6$, we get
$$
x_n= 4x_{n-1}-x_{n-2}-6x_{n-3} \quad\mbox{ for } n\ge 4
$$
Let $y_n = x_n + 6$. Then
$$
y_n= 4y_{n-1}-y_{n-2}-6y_{n-3} + 24
$$
and the claim follows immediately by induction after checking it for $y_1, y_2, y_3$, which are all zero.
