Example 2 Use $1$, $2$, and $3$ to write $n$-digit numbers, with the requirement that no two $1$s are adjacent. How many $n$-digit numbers can be formed?
Solution: Let the number of $n$-digit numbers that meet the condition be $a_{n}$. By dividing according to the first digit, we can categorize them as follows:
I. If the first digit is 2 or 3, then the following $n-1$ digits each have $a_{n-1}$ possibilities, totaling $2 a_{n-1}$;
II. If the first digit is 1, the second digit can only be 2 or 3, giving a total of $2 a_{n-2}$ possibilities.
Thus, $a_{n}=2 a_{n-1}+2 a_{n-2}$ (cases).
Given the initial conditions $a_{1}=3, a_{2}=8$, and using the characteristic equation, we find
$$
a_{n}=\frac{\sqrt{3}+2}{2 \sqrt{3}}(1+\sqrt{3})^{n}+\frac{\sqrt{3}-2}{2 \sqrt{3}}(1-\sqrt{3})^{n} .
$$