Example 3 Divide a circle into $n(n \geqslant 2)$ sectors, sequentially denoted as $S_{1}, S_{2}, \cdots, S_{n}$ (as shown in the figure). Each sector can be painted with any of the two colors: red, white, or blue, with the requirement that adjacent sectors must have different colors. How many coloring methods are there?
Let the number of coloring methods be $a_{n}$, and add a sector $S_{n+1}$. We first color $S_{1}$, which has 3 options; coloring $S_{2}$ has 2 options; $\cdots$; coloring $S_{n}$ has 2 options; coloring $S_{n+1}$ is temporarily only required to be different from $S_{n}$. There are a total of $3 \times 2^{n}$ coloring methods. Among them:
(1) $S_{n+1}$ and $S_{1}$ have different colors, then there are $a_{n+1}$ ways;
(2) $S_{n+1}$ and $S_{1}$ have the same color, then merging $S_{n+1}$ and $S_{1}$ into 1 sector, the coloring method is equivalent to dividing the circle into $n$ sectors, which has $a_{n}$ ways.
Thus, $a_{n+1}+a_{n}=3 \times 2^{n}$. It is easy to find that $a_{2}=6$.
Let $a_{n}=2^{n} b_{n}$, then
$$
b_{n+1}=-\frac{1}{2} b_{n}+\frac{3}{2},
$$

which means $b_{n+1}-1=-\frac{1}{2}\left(b_{n}-1\right)$.
$$
\therefore b_{n}-1=\left(b_{2}-1\right)\left(-\frac{1}{2}\right)^{n-2} \text {, }
$$

thus $i_{n}=1+\frac{1}{2}\left(-\frac{1}{2}\right)^{n-2}$.
Therefore, $a_{n}=2^{n}+2(-1)^{n}$.