Example 1 Let the sequence $\left\{a_{n}\right\}$ satisfy
$$
a_{1}=a_{2}=1, a_{n}=\sqrt{3} a_{n-1}-a_{n-2}(n \geqslant 3) \text {. }
$$

Find $a_{2013}$.
Let $x, y$ satisfy
$$
\begin{array}{l}
a_{n}-x a_{n-1}=y\left(a_{n-1}-x a_{n-2}\right) \\
\Rightarrow a_{n}=(x+y) a_{n-1}-x y a_{n-2} .
\end{array}
$$

Comparing with equation (1), we know that $x, y$ are the two roots of the equation
$$
t^{2}-m t+p=0
$$

and $x, y$ are both non-zero.
Clearly, $\left\{a_{n}-x a_{n-1}\right\}$ is a geometric sequence with common ratio $y$, so we have
$$
a_{n}-x a_{n-1}=y^{n-2}\left(a_{2}-x a_{1}\right)(n \geqslant 3) \text {. }
$$

Let $r=a_{2}-x a_{1}$, substituting into the above equation gives
$$
a_{n}=x a_{n-1}+r y^{n-2}(n \geqslant 3) \text {. }
$$

Also, $x, y$ and $r$ can be considered known. For equation (3), we can let
$$
a_{n}+s y^{n}=x\left(a_{n-1}+s y^{n-1}\right) \text {. }
$$

Thus, $a_{n}=x a_{n-1}+s(x-y) y^{n-1}(n \geqslant 3)$.
Next, we discuss the discriminant of equation (2) in two cases.
(1) $\Delta=m^{2}-4 p \neq 0$.

Then $x \neq y$ (in the complex number range).
From equations (3) and (5), we get $s=\frac{r}{y(x-y)}$.
From equation (4), we get
$$
\begin{array}{l}
a_{n}+s y^{n}=x^{n-2}\left(a_{2}+s y^{2}\right) \\
\Rightarrow a_{n}=a_{2} x^{n-2}+\frac{a_{2}-x a_{1}}{x-y}\left(x^{n-2} y-y^{n-1}\right) \\
\Rightarrow a_{n}=\frac{a_{2}\left(x^{n-1}-y^{n-1}\right)-a_{1} p\left(x^{n-2}-y^{n-2}\right)}{x-y} .
\end{array}
$$
(2) $\Delta=m^{2}-4 p=0$.

Then $x=y$.
From the assumption in equation (4), it leads to no solution for $s$. We need to change our approach.
From equation (3), we get $a_{n}=x a_{n-1}+r x^{n-2}(n \geqslant 3)$.
By iteration, we get
$$
\begin{aligned}
a_{n} & =x\left(x a_{n-2}+r x^{n-3}\right)+r x^{n-2} \\
= & x^{2} a_{n-2}+2 r x^{n-2}=\cdots \\
= & x^{n-3} a_{3}+(n-3) r x^{n-2} \\
\quad= & x^{n-3}\left(m a_{2}-p a_{1}\right)+(n-3)\left(a_{2}-x a_{1}\right) x^{n-2},
\end{aligned}
$$

where $m^{2}=4 p$.
In summary,
$$
a_{n}=\left\{\begin{array}{ll}
\frac{a_{2}\left(x^{n-1}-y^{n-1}\right)-a_{1} p\left(x^{n-2}-y^{n-2}\right)}{x-y}, & m^{2} \neq 4 p ; \\
x^{n-3}\left(m a_{2}-p a_{1}\right)+(n-3)\left(a_{2}-x a_{1}\right) x^{n-2}, & m^{2}=4 p .
\end{array}\right.
$$

Returning to Example 1.
Take $m=\sqrt{3}, p=1, a_{1}=a_{2}=1$.
From $t^{2}-\sqrt{3} t+1=0 \Rightarrow t=\frac{\sqrt{3}}{2} \pm \frac{1}{2} \mathrm{i}$.
Using $x=t_{1}=-\omega \mathrm{i}, y=t_{2}=\bar{\omega} \mathrm{i}$, substituting into equation (6) and simplifying, we get
$$
\begin{array}{l}
a_{2013} \\
=\frac{\left[(-\omega \mathrm{i})^{2012}-(\bar{\omega} \mathrm{i})^{2012}\right]-\left[(-\omega \mathrm{i})^{2011}-(\bar{\omega} \mathrm{i})^{2011}\right]}{-\omega \mathrm{i}-\bar{\omega} \mathrm{i}} \\
=1-\sqrt{3} .
\end{array}
$$