Given the sequence $\left\{a_{n}\right\}$ satisfies
$a_{1}=1, a_{2 n}=\left\{\begin{array}{ll}a_{n}, & n \text { is even; } \\ 2 a_{n}, & n \text { is odd, }\end{array}\right.$
$a_{2 n+1}=\left\{\begin{array}{ll}2 a_{n}+1, & n \text { is even; } \\ a_{n}, & n \text { is odd. }\end{array}\right.$
Find the number of positive integers $n$ in the range $[1,2014]$ that satisfy $a_{n}=a_{2014}$.
Solve: From the given, we have
$$
\begin{array}{l}
a_{2014}=2 a_{1007}=2 a_{503}=2 a_{251}=2 a_{125} \\
=2\left(2 a_{62}+1\right)=2\left(4 a_{31}+1\right) \\
=2\left(4 a_{15}+1\right)=2\left(4 a_{7}+1\right) \\
=2\left(4 a_{3}+1\right)=2\left(4 a_{1}+1\right)=10 .
\end{array}
$$

In fact, $a_{n}$ can be obtained through the following process.
Write $n$ in binary, then replace consecutive "1"s with a single "1" and consecutive "0"s with a single "0". Denote this sequence as $\left\{b_{n}\right\}$.
For example, $2014=(11111011110)_{2}$,
$b_{2014}=(1010)_{2}=10$.
We will prove by mathematical induction that:
$$
a_{n}=b_{n}\left(n \in \mathbf{Z}_{+}\right) \text {. }
$$

Clearly, $a_{1}=1=b_{1}, a_{2}=2=b_{2}, a_{3}=1=b_{3}$. Assume that $a_{t}=b_{t}$ holds for any positive integer $t<n$.
(1) When $n=2 k$, if $k$ is even, then $a_{2 k}=$ $a_{k}$, and the last two digits of $n=2 k$ in binary are 00, so $b_{2 k}$ $=b_{k}$, thus, $a_{2 k}=b_{2 k}$; if $k$ is odd, then $a_{2 k}=2 a_{k}$, and the last two digits of $n=2 k$ in binary are 10, so $b_{2 k}=$ $2 b_{k}$, thus, $a_{2 k}=b_{2 k}$.
(2) When $n=2 k+1$, if $k$ is even, then $a_{2 k+1}=2 a_{k}+1$, and the last two digits of $n=2 k$ in binary are 01, so $b_{2 k+1}=2 b_{k}+1$, thus, $a_{2 k+1}=b_{2 k+1}$; if $k$ is odd, then $a_{2 k+1}=a_{k}$, and the last two digits of $n=2 k$ in binary are 11, so $b_{2 k+1}=b_{k}$, thus, $a_{2 k+1}=$ $b_{2 k+1}$.
Therefore, the original problem is equivalent to
$a_{n}=b_{n}=b_{2014}=(1010)_{2}$
$=10$ the number of positive integers $n$
$\Leftrightarrow$ the number of $n$ such that when written in binary, it becomes $(1010)_{2}$ according to the rules.
Since $n<2048=2^{11}$, i.e., $n$ in binary has at most 11 digits, and numbers larger than
$$
2014=(11111011110)_{2}
$$

do not meet the requirements.
This can be understood as selecting 4 positions out of 11 to fill (1010), with 0s before the first 1 and the remaining spaces filled with the digit before the space.

The $n$ that do not meet the requirements can be understood as selecting 3 positions out of the last 5 to fill (010), with 1s before the first 0 and the remaining spaces filled with the digit before the space.

Therefore, there are $\mathrm{C}_{11}^{4}-\mathrm{C}_{5}^{3}=320$ positive integers $n$ that meet the requirements.