$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?

HINT:
$$z=100^2-x^2=(100-x)(100+x)$$
As $(100-x)+(100+x)=200,100\pm x$ have same parity and 
if one is divisible by $3,$the other is not
So if $2|z,100\pm x$ must be even
If $3|z,3|(100-x)(100+x)\implies$ 
either $3|(100-x)\iff x\equiv1\pmod3$ 
or $3|(100+x)\iff x\equiv-1\pmod3$ 
