4. Given the sequence $\left\{a_{n}\right\}$, where $a_{1}=\frac{1}{2}$, and $a_{n+1}=\frac{a_{n}}{2 a_{n}+1}$, the value of $a_{1000}$ is ( ).
A. $\frac{1}{1999}$
B. $\frac{1}{2000}$
C. $\frac{1}{2001}$
D. $\frac{1}{2002}$
4. B.

From $a_{n+1}=\frac{a_{n}}{2 a_{n}+1}$, we get $\frac{1}{a_{n+1}}=\frac{1}{a_{n}}+2$, so the sequence $\left\{\frac{1}{a_{n}}\right\}$ is an arithmetic sequence with the first term 2 and common difference 2. Therefore, $\frac{1}{a_{n}}=2+(n-1) 2=2 n$, so $a_{n}=\frac{1}{2 n}$. Hence, $a_{1000}=\frac{1}{2000}$.