10. Among $1,2,3,4, \cdots, 1000$, the numbers that can be written in the form $a^{2}-b^{2}+1(a, b \in \mathbf{N})$ and are not divisible by 3 are $\qquad$ in number.
答建 501 .
解析 Let $S=\{1,2,3,4, \cdots, 1000\}$, if $n=a^{2}-b^{2}+1$, then $n \not \equiv 3(\bmod 4)$.
Also, $4 k=(2 k)^{2}-(2 k-1)^{2}+1,4 k+1=(k+1)^{2}-(k-1)^{2}+1,4 k+2=(2 k+1)^{2}-(2 k)^{2}+1$.
Therefore, $n=a^{2}-b^{2}+1$ if and only if $n \neq \equiv 3(\bmod 4)$.
Let $A=\{a \in S \mid a \equiv 3(\bmod 4)\}, B=\{b \in S \mid b \equiv 0(\bmod 3)\}$, then $A \cap B=\{c \in S \mid c \equiv 3(\bmod 12)\}$, so $|A|=250,|B|=333,|A \cap B|=84$, thus the number of elements that meet the condition is $1000-250-333+84=501$.