Example 7 Divide a circle into $n$ sectors $(n \geqslant 2)$, sequentially denoted as $S_{1}, S_{2}, \cdots, S_{n}$. Each sector can be painted with any of the three different colors: red, blue, and white, with the requirement that adjacent sectors must have different colors. How many ways are there to color the sectors?
Solution: Let the total number of coloring methods be $a_{n}(n \geqslant 2)$. When $n=2$, first color $S_{1}$, there are 3 ways to color it, and then $S_{2}$ has only two ways to be colored, thus $a_{2}=6$. Now we seek the recurrence relation for $a_{n}$: $S_{1}$ has 3 ways to be colored, $S_{2}$ has 2 ways, $\cdots, S_{n-1}$ has 2 ways, and $S_{n}$ still has two ways to be colored (regardless of whether it is the same color as $S_{1}$), so there are a total of $3 \times 2^{n-1}$ ways to color, but these $3 \times 2^{n-1}$ ways can be divided into two categories: one is $S_{n}$ being the same color as $S_{1}$; the other is $S_{n}$ being a different color from $S_{1}$. The former does not meet the requirement, but it can be considered that $S_{n}$ and $S_{1}$ merge into one sector, at this time there are $a_{n-1}$ ways to color, so the recurrence relation is $a_{n}+a_{n-1}=3 \times 2^{n-1}$.
Let $p_{n}=\frac{a_{n}}{2^{n}}$, then $2 p_{n}+p_{n-1}=3$, thus
$$
p_{n}-p_{n-1}=-\frac{1}{2}\left(p_{n-1}-p_{n-2}\right)(n \geqslant 3),
$$

therefore,
$$
p_{n}-p_{n-1}=\left(-\frac{1}{2}\right)^{2}\left(p_{n-2}-p_{n-3}\right)=\cdots=\left(-\frac{1}{2}\right)^{n-3}\left(p_{3}-p_{2}\right) .
$$

From $a_{2}=6$ we know $p_{2}=\frac{3}{2}, p_{3}=\frac{3}{4}$, so
$$
\begin{aligned}
p_{n} & =p_{2}+\left(p_{3}-p_{2}\right)+\left(p_{4}-p_{3}\right)+\cdots+\left(p_{n}-p_{n-1}\right) \\
& =p_{2}+\left(p_{3}-p_{2}\right)+\left(-\frac{1}{2}\right)^{n-3}\left(p_{3}-p_{2}\right) \\
& =1+(-1)^{n}\left(\frac{1}{2}\right)^{n-1} .
\end{aligned}
$$

Thus, $a_{n}=2^{n}+(-1)^{n} \cdot 2(n \geqslant 2)$.