<s>[INST] Probability that $x^2+y^2$ is divisible by $5$ and $7$ Two natural numbers $x$ and $y$ are chosen at random with a uniform distribution.Then the question is to find out the probability that $x^2+y^2$ is divisible by $5$ and $7$.
I understand that divisible by $5$ and $7$ is the same thing as divisible by $35$.But I am a bit confused on how to calculate probability on an infinite set.Any help shall be highly appreciated.Thanks.
 [/INST] $1^2≡1, 2^2≡4, 3^2≡2, 4^2≡2, 5^2≡4, 6^2≡1 \mod 7$.　
Then $x,y$ are multiple of $7$.     Since about one's place $1+7^2≡1+9,4^2+7^2≡6+9,  4^2+8^2≡6+4,1^2+8^2≡1+4≡0\pmod5$, these are multiple of 5. Therefore they are 9 patterns of $(0,0)(7,14)(7,21)(14,7)(14,28)(21,7)(21,28)(28,14)(28,21) \pmod{35}$$$\dfrac9{35^2}=0.735\%$$
</s>