3. Given $0 \leqslant x_{0}<1$, let $x_{n}=\left\{\begin{array}{ll}2 x_{n-1}, & \text { if } 2 x_{n-1}<1, \\ 2 x_{n-1}-1, & \text { if } 2 x_{n-1} \geqslant 1 .\end{array}\right.$ The number of $x_{0}$ such that $x_{0}=x_{5}$ is
A. 0
B. 1
C. 5
D. 31
3. D Let $x_{0} \in[0,1)$, represented in binary form as
$x_{0}=0 . d_{1} d_{2} d_{3} d_{4} d_{5} d_{6} d_{7} \cdots$ (each $d_{k}=0$ or 1 ).
From the given recursive relationship, we can deduce: moving the binary point one position to the right and then omitting all the digits before the point. That is, $x_{0}=0 . d_{1} d_{2} d_{3} d_{4} d_{5} d_{6} d_{7} \cdots$. Then $x_{1}=0 . d_{2} d_{3} d_{4} d_{5} d_{6} d_{7} \cdots$.
Therefore, from $x_{0}=x_{5}$, we have $0 . d_{1} d_{2} d_{3} d_{4} d_{5} d_{6} d_{7} \cdots=0 . d_{6} d_{7} d_{8} d_{9} d_{10} d_{11} d_{12} \cdots$.
This is true if and only if $x_{0}$ extends with $d_{1} d_{2} d_{3} d_{4} d_{5}$ as a repeating cycle, giving a total of $2^{5}=32$ such cycles.
However, when $d_{1}=d_{2}=d_{3}=d_{4}=d_{5}=1$, we have $x_{0}=1$. Therefore, for $x_{0} \in[0,1)$ that satisfies $x_{0}=x_{5}$, there are $32-$ $1=31$ values. Hence, the answer is D.