13. How many positive integers $x$, less than 10000, are there for which the difference $2^{x}-x^{2}$ is not divisible by 7?
13. $2^{0}=1$ gives a remainder of $1$ when divided by 7, $2^{1}=2$ gives a remainder of $2$, $2^{2}=4$ gives a remainder of $4$, $2^{3}$ gives a remainder of $1$ again, $2^{4}$ gives a remainder of $2$ again, $2^{5}$ gives a remainder of $4$ again, $2^{6}$ gives a remainder of $1$ for the third time, and so on. Thus, when dividing $2^{x}$ by 7, the remainders can only be the numbers 1, 2, and 4, and these remainders periodically repeat in the following order: 1, 2, 4; 1, 2, 4; 1, 2, 4; ...

Now, let's represent $x$ as $x=7t+s$, where $s<7$. Then the remainders from dividing $x^{2}$ by 7 are the same as the remainders from dividing $s^{2}$ by 7. If $s$ takes the values $0, 1, 2, 3, 4, 5$, and 6, then the remainders from dividing $s^{2}$ by 7 will be the numbers $0, 1, 4, 2, 2, 4$, and 1, respectively. Therefore, the remainders from dividing $x^{2}$ by 7 can only be the numbers $0, 1, 4$, and 2, and these remainders periodically repeat in the following order: $0, 1, 4, 2, 2, 4, 1$. Since the remainders from dividing $2^{x}$ by 7 periodically repeat every 3 values of $x$, and the remainders from dividing $x^{2}$ by 7 periodically repeat every 7 values of $x$, the remainders from dividing $2^{x}-x^{2}$ by 7 will periodically repeat every 21 values of $x$. Let's write out the first 21 remainders from dividing $2^{x}$ and $x^{2}$ by 7 one under the other:

$$
\begin{array}{rrrrrrrrrrrrrrrrrrrrr}
-1 & 2 & 4 & 1 & 2 & 4 & 1 & 2 & 4 & 1 & 2 & 4 & 1 & 2 & 4 & 1 & 2 & 4 & 1 & 2 & 4 \\
0 & 1 & 4 & 2 & 2 & 4 & 1 & 0 & 1 & 4 & 2 & 2 & 4 & 1 & 0 & 1 & 4 & 2 & 2 & 4 & 1 .
\end{array}
$$

From this, we see that the remainders from dividing $2^{x}$ and $x^{2}$ by 7 coincide 6 times (for $x=2, 4, 5, 6, 10, 15$). Therefore, among the numbers $2^{x}-x^{2}$, where $x=0, 1, 2, \ldots, 20$, exactly 6 numbers are divisible by 7 without a remainder.

Since $10000=21 \cdot 476+4$, there are 476 complete intervals of 21 numbers among the numbers less than 10000. Therefore, for $x$ not exceeding $9996=21 \cdot 476$, the number $2^{x}-x^{2}$ is divisible by 7 exactly $476 \cdot 6=2856$ times. The remaining three numbers less than 10000 give remainders of 1, 2, and 3 when divided by 21; therefore, one of these numbers (specifically 9998) gives the 2857th value of $x$ for which $2^{x}-x^{2}$ is divisible by 7 without a remainder. Thus, there are a total of $2856+1=2857$ numbers $x$ less than 10000 for which $2^{x}-x^{2}$ is divisible by 7. For the remaining $9999-2857=7142$ numbers $x$ less than 10000, the expression $2^{x}-x^{2}$ is not divisible by 7.