How many natural numbers $x$, less than 10000, are there for which $2^{x}-x^{2}$ is divisible by 7?
The remainders of the division by 7 of the numbers $2^{x}$ and $x^{2}$ repeat with periods of 3 and 7, respectively, so the remainders of the division by 7 of the numbers $2^{x}$ and $x^{2}$ repeat with a period of 21. Among the numbers $x$ from 1 to 21, equal remainders from the division by 7 of the numbers $2^{x}$ and $x^{2}$ are given by exactly 6 numbers. Therefore, among the numbers from 1 to $9996=21 \cdot 476$, there are $476 \cdot 6=2856$ required numbers. Direct verification using the obtained sequence of remainders shows that of the remaining numbers 9997, 9998, and 9999, only the number 9998 has the required property.

## Answer

2857.