$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?
Just a different way to highlight what has already been correctly noted, and to explain why the answer could be $66$, as stated in one of the initial comments by the author of the OP. To avoid confusion, I interpreted the problem as the question of how many values of $x$ lead to a positive $z$ that is divisible by $6$.
Let us start from $z=(100-x)(100+x)$, where the two factors $100-x$ and $100+x$ clearly have the same parity. First, we can observe that the only possibility that $z$ is divisible by $6$ occurs when at least one of these two factors is divisible by $6$. In fact, if any of the two factors is divisible by $3$ and not by $2$, the other factor is also not divisible by $2$, and so $z$ cannot be divisible by $6$.
Then, we can note that $100-x$ is divisible by $6$ only when $x=6j+4$ (with $j$ integer), whereas $100+x$ is divisible by $6$ only when $x=6j+2$.
If we limit the problem to solutions that give positive values of $z$ (although this is not specified in the OP), then $|x|$ can only assume integer values $<100$. It is not difficult to note that there are $16$ positive integers $<100$ of the form $x=6j+4$ (they are $4,10,16,22...94$) and $17$ positive integers $<100$ of the form $x=6j+2$ (they are $2,8,14,20...98$). So, there are $33$ positive integer values of $x$ that lead to a $z$ value that is divisible by $6$.
Lastly, because each of these solutions with a given positive $x$ corresponds to another symmetric solution with $-x$, we have to count other $33$ negative values of $x$. This finally leads to a total of $66$ solutions.