Ten lockers are in a row. The lockers are numbered in order with the positive integers 1 to 10. Each locker is to be painted either blue, red or green subject to the following rules:
Two lockers numbered $m$ and $n$ are painted different colours whenever $m−n$ is odd.
It is not required that all 3 colours be used.
In how many ways can the collection of lockers be painted?
Attempt:
Notice that the total number of coloring schemes without the rules is $3^{10}$. The total number of coloring schemes where every two side-by-side lockers have different color is $3 \cdot 2^{9}$ (this corresponds to $m-n=1$). The total number of coloring schemes where $m-n = 3$ is $(3 \cdot 2)^{7}$, without considering the others $m-n$. Also for $m-n = 5$, the total number of schemes is $(3 \cdot 2)^{5}$. For $m-n=7$, $(3 \cdot 2)^{3}$. For $m-n=9$, $(3 \cdot 2)$.
How to continue?