Example 2 Consider the following sequence:
$$101,10101,1010101, \cdots$$

Question: How many prime numbers are there in this sequence?
It is easy to know that 101 is a prime number. Next, we prove that this is the only prime number in the sequence.
Let $a_{n}=\underbrace{10101 \cdots 01}_{n \uparrow 01}$, then when $n \geqslant 2$, we have
$$\begin{aligned}
a_{n} & =10^{2 n}+10^{2(n-1)}+\cdots+1 \\
& =\frac{10^{2(n+1)}-1}{10^{2}-1} \\
& =\frac{\left(10^{n+1}-1\right)\left(10^{n+1}+1\right)}{99} .
\end{aligned}$$

Notice that, $99<10^{n+1}-1,99<10^{n+1}+1$, and $a_{n}$ is a positive integer, so $a_{n}$ is a composite number (because the terms $10^{n+1}-1$ and $10^{n+1}+1$ in the numerator cannot be reduced to 1 by 99).