Example 2-31 Form an n-digit number using the 5 digits $1,3,5,7,9$, with the requirement that the digits 3 and 7 appear an even number of times, while the other 3 digits have no restrictions. How many such numbers are there?
Let the number of $n$-digit numbers that meet the criteria be denoted by the sequence $a_{n}, a_{0}, a_{1}, a_{2}, \cdots, a_{n}, \cdots$, and the exponential generating function for this sequence be
$$
\begin{array}{c}
G_{\mathrm{e}}(x)=\left(1+\frac{x^{2}}{2!}+\frac{x^{4}}{4!}+\cdots\right)^{2}\left(1+x+\frac{1}{2!} x^{2}+\frac{1}{3!} x^{3}+\cdots\right)^{3}, \\
3 \text { and } 7 \text { corresponding terms }, \text { corresponding terms } \\
1+\frac{1}{2!} x^{2}+\frac{1}{4!} x^{4}+\cdots=\frac{\left(\mathrm{e}^{x}+\mathrm{e}^{-x}\right)}{2}, \\
\mathrm{e}^{-x}=1-x+\frac{1}{2!} x-\frac{1}{3!} x^{3}+\cdots \\
G_{\mathrm{e}}(x)=\frac{1}{4}\left(\mathrm{e}^{x}+\mathrm{e}^{-x}\right)^{2}+\mathrm{e}^{3 x} \\
=\frac{1}{4}\left(\mathrm{e}^{2 x}+2+\mathrm{e}^{-2 x}\right) \cdot \mathrm{e}^{3 x} \\
=\frac{1}{4}\left(\mathrm{e}^{5 x}+2 \mathrm{e}^{3 x}+\mathrm{e}^{x}\right) \\
=\frac{1}{4} \sum_{n=0}^{\infty}\left(5^{n}+2 \cdot 3^{n}+1\right) \frac{x^{n}}{n!} \\
a_{n}=\left(5^{n}+2 \cdot 3^{n}+1\right) / 4
\end{array}
$$
Therefore