3-4. How many pairs of integers $x, y$, lying between 1 and 1000, are there such that $x^{2}+y^{2}$ is divisible by 7.
Solve 4. Answer: $142^{2}=20164$. The number $x^{2}+y^{2}$ is divisible by 7 if and only if both numbers $x$ and $y$ are divisible by 7. Indeed, the square of an integer when divided by 7 gives remainders of 0, 2, and 4. The number of integers between 1 and 1000 that are divisible by 7 is 142. Therefore, the desired number is $142^{2}=20164$.

## 9 - 10 grades