10. Let $n$ be a positive integer. If in the $2 n+1$ consecutive natural numbers including 2009, the sum of the squares of the first $n+1$ numbers is equal to the sum of the squares of the last $n$ numbers, then the value of $n$ is $\qquad$.
10. 31 .

Let $m, m+1, \cdots, m+2 n$ be $2 n+1$ consecutive natural numbers that satisfy the above conditions. Then
$$
\begin{array}{l}
m^{2}+(m+1)^{2}+\cdots+(m+n)^{2} \\
=(m+n+1)^{2}+(m+n+2)^{2}+\cdots+(m+2 n)^{2} . \\
\text { Let } S_{k}=1^{2}+2^{2}+\cdots+k^{2} \text {. Then } \\
S_{m+n}-S_{m-1}=S_{m+2 n}-S_{m+n} .
\end{array}
$$

Substituting and simplifying, we get $2 m n^{2}+2 n^{3}-m^{2}+n^{2}=0$, which is $m=2 n^{2}+n$.

Also, $m \leqslant 2009 \leqslant m+2 n$, then
$$
2 n^{2}+n \leqslant 2009 \leqslant 2 n^{2}+3 n \text {. }
$$

Therefore, $n=31$.
(Xingguo Xia provided)