$z=100^2-x^2$. Then, how many values of $x,z$ are divisible by $6$? 
$z=100^2-x^2$. Then, how many values of $x,z$ are divisible by $6$?

My approach:
For $x=1$, $z$ is not divisible by $6$. 
For $x=2$, $z$ is divisible by $6$.
For $x=3$, $z$ is not divisible by $6$. 
For $x=4$, $z$ is divisible by $6$. 
For $x=5$, $z$ is not divisible by $6$. 
For $x=6$, $z$ is not divisible by $6$. 
For $x=7$, $z$ is divisible by $6$. 
For $x=8$, $z$ is divisible by $6$. 
I could not identify the pattern in these questions. Also can this problem be solved with a better approach?

I think a good idea for the problem is using modulos. So, the problem can be written like this
$$
z=4-x^2 \text{ }mod(6),
$$
We know that $100=96+4=4\quad mod(6)$. So $100^2=(100)*(100)=4*4=16=12+4=4\quad mod(6)$. If $z$ is divisible for $6$, then $z=0\quad mod(6)$. For all of this we have to find $x$ such that
$$
x^2=4\quad mod(6).
$$
We have to make a table where we can analize $x^2\quad mod(6)$.
For $x=0$, $x^2=0$ and $x^2=0\quad mod(6)$. 
For $x=1$, $x^2=1$ and $x^2=1\quad mod(6)$. 
For $x=2$, $x^2=4$ and $x^2=4\quad mod(6)$. 
For $x=3$, $x^2=9$ and $x^2=3\quad mod(6)$. 
For $x=4$, $x^2=16$ and $x^2=4\quad mod(6)$. 
For $x=5$, $x^2=25$ and $x^2=1\quad mod(6)$. 
So, the last proposition implies that $x=2 \quad mod(6)$ or $x=4 \quad mod(6)$.
In summary, if $x=2+6m$ or $x=4+6n$ for $m,n\in\mathbb{Z}$. Then, $z$ is divisible by $6$. There are infinity solutions. 
