4. Let $a_{n}$ denote the integer closest to $\sqrt{n}(n \in \mathbf{N})$. Then the value of $\frac{1}{a_{1}}+\frac{1}{a_{2}}+\frac{1}{a_{3}}+\ldots+\frac{1}{a_{2001}}$ is $\qquad$ .
$4.88 \frac{7}{15}$.
Since $\sqrt{n}(n \in \mathbf{N})$ is either an integer or an irrational number,
$$
\begin{aligned}
\therefore a_{n}=k(k \in \mathbf{N}) & \Leftrightarrow k-\frac{1}{2}<\sqrt{n}<k+\frac{1}{2} \\
& \Leftrightarrow k^{2}-k+1 \leqslant n \leqslant k^{2}+k,
\end{aligned}
$$

That is, when $n$ takes the $2k$ natural numbers $k^{2}-k+1, k^{2}-k+2, \ldots, k^{2}+k$, $a_{n}=k$. Therefore,
$$
\begin{array}{l}
\frac{1}{a_{k}^{2}-k+1}+\frac{1}{a_{k}^{2}-k+2}+\ldots+\frac{1}{a_{k}^{2}+k}=2 k \frac{1}{k}=2 . \\
\because 44^{2}+44<2001<45^{2}+45 \text {, and } \\
44^{2}+44=1980,
\end{array}
$$
$\therefore a_{1}, a_{2} \ldots, a_{1980}$ contain 2 ones, 14 twos, ..., 88 forty-fours.
And $a_{1981}=a_{1982}=\ldots=a_{2001}=45$ then
$$
\frac{1}{a_{1}}+\frac{1}{a_{2}}+\ldots+\frac{1}{a_{2001}}=44 \times 2+21 \times \frac{1}{45}=88 \frac{7}{15}
$$