Example 3. How many $n$-digit numbers can be formed using $1,2,3,4$ that contain an even number of 1s.
Let $a_{0}$ be the number of $n$-digit numbers with an even number of 1s.
We discuss in two cases:
(i) 1 is in the first position, at this time the remaining $n-1$ digits have an odd number of 1s.

Each of the $n-1$ digits has 4 choices, so there are $4^{n-1}$ different cases. However, these $4^{n-1}$ cases include both those with an odd number of 1s and those with an even number of 1s. The $n-1$-digit numbers with an even number of 1s are $a_{0-1}$.

Therefore, there are $4^{n-1}-a_{0-1}$ $n$-digit numbers with 1 in the first position.
(ii) 2, 3, 4 are in the first position, and the subsequent $n-1$ digits have an even number of 1s, each having $a_{0-1}$ $n$-digit numbers, so there are $3 a_{0-1}$ $n$-digit numbers in total.
$$
\begin{array}{l}
\text { From (i) and (ii), we have } \\
a_{\mathrm{n}}=\left(4^{\mathrm{n}-1}-a_{\mathrm{n}-1}\right)+3 a_{\mathrm{n}-1}, \\
a_{\mathrm{n}}=2 a_{\mathrm{n}-1}+4^{\mathrm{n}-1} .
\end{array}
$$

Since there are 3 one-digit numbers with an even number of 1s (0 1s) (2, 3, 4), we have $a_{1}=3$.
Next, we find the expression for $a_{0}$.
$$
\begin{array}{l}
a_{\mathrm{n}}=2 a_{\mathrm{n}-1}+4^{\mathrm{n}-1}, \\
a_{\mathrm{n}-1}=2 a_{\mathrm{n}-2}+4^{\mathrm{n}-2}, \\
\text {......, } \\
a_{2}=2 a_{1}+4. \\
(n-1) \\
\text { (1) }+(2) \times 2+\cdots+(n-1) \times 2^{n-2} \text { gives } \\
a_{\mathrm{n}}=2^{\mathrm{n}-1} a_{1}+4^{\mathrm{n}-1}+2 \times 4^{\mathrm{n}-2}+\cdots \\
+4 \times 2^{\mathrm{n}-2} \\
=2^{\mathrm{n}-1} a_{1}+2^{2 \mathrm{n}-1}-2^{\mathrm{n}} \\
=3 \cdot 2^{\mathrm{n}-1}+2^{2 \mathrm{n}-1}-2^{n} \\
=\frac{1}{4}\left(4^{n}+2^{n}\right). \\
\end{array}
$$

Therefore, the numbers 1, 2, 3, 4 can be used.