4. Given a positive integer $n$ less than 2011. Then
$$
\sum_{i=1}^{2010}\left[\frac{2 i n}{2011}\right]=
$$
$\qquad$
where $[x]$ denotes the greatest integer not exceeding the real number $x$.
4. $1005(2 n-1)$

Notice,
$$
\begin{array}{l}
\sum_{i=1}^{2010}\left[\frac{2 i n}{2011}\right] \\
=\frac{1}{2} \sum_{i=1}^{2010}\left(\left[\frac{2 i n}{2011}\right]+\left[\frac{2(2011-i) n}{2011}\right]\right) \\
=\frac{1}{2} \times 2010 \times(2 n-1) \\
=1005(2 n-1) .
\end{array}
$$