Problem: How many of the integers between 1 and 1000, inclusive, can be expressed as the difference of the squares of two nonnegative integers?
Solution: A line of thought leads us to consider partitioning this problem by remainders of $4$. We want that $0 < n^2-k^2 \le 1000$ for some $n,k \in \mathbb{N}$ with $n > k$. We find that $n^2-k^2 = (n+k)(n-k).$ That is, if our number can be written as the product of two even numbers say $2p$ and $2q$ for some integral $p,q$, then we have that $n+k = 2p$ and $n-k = 2q$ meaning $n = p+q$ and $k = p-q$. So a number must be divisible by $4$. Then we may think that numbers that can be written as the product of two odd numbers could work since $n+k=2q+1$ and $n-k = 2p+1$ means $n = 2(p+q)+1$ and $k = 2(q-p)$. So here is this nice idea. Odd numbers are indeed covered for the simpler reason that $(n+1)^2-n^2 = 2n+1$ for all $n \in \mathbb{N}$. We clearly have that numbers that are $ \equiv 0 \pmod 4$ are covered. What about numbers that are $1 \pmod 4$ or $2 \pmod 4$? Recall that squares are either $0,1 \pmod 4)$ meaning the difference of two squares will never yield remainder $2$. Thus, we find that there are $750$ numbers that are either $0,1,3 \pmod 4$ within the bounds.