4. Given a finite arithmetic sequence $\left\{a_{n}\right\}$ with the first term $a_{1}=1$, and a common difference of 2, the arithmetic mean of all its terms is 2011. If one term is removed, the arithmetic mean of the remaining terms is an integer. Then the number of ways to remove a term is $\qquad$.
4.3.

According to the problem, we have
$$
\frac{1}{n}\left[n+\frac{n(n-1)}{2} \times 2\right]=2011 \text {. }
$$

Solving this, we get $n=2011$.
Thus, the sum of all terms in the sequence is $2011^{2}$.
Suppose that after removing the $k$-th term from the sequence, the arithmetic mean of the remaining terms is an integer, i.e.,
$$
\frac{2011^{2}-(2 k-1)}{2010} \in \mathbf{Z} \text {. }
$$

Noting that $2011^{2}=2010 \times 2012+1$, the above equation is equivalent to
$$
2010|2(1-k) \Rightarrow 1005|(1-k) \text {. }
$$

Since $1 \leqslant k \leqslant 2011$, the set of possible values for $k$ is $\{1,1006,2011\}$.