<s>[INST] Sum of squares of two integers divisible by five Supposing $x,y$ are natural numbers,
what is the probability that the sum of their squares are divisible by 5?
I am getting $1/3$ as squares can only end with $0,1,4,5,6,9$. So $36$ pairs are possible. And $12$ pairs { $(0,0),(1,4),(4,1),(4,6),...$} have sums which end in $...0$ or $...5$.
But the answer is given as $\frac{9}{25}$. Can anyone posit a solution?
 [/INST] Given $x, y$, only the last digits are relevant in determining if $x^2 + y^2$ is  divisible by $5$. The last digit can be $0, 1, \ldots, 9$ and all of them are equally likely. Taking the last two digits of $x, y$, we get a sample space of size $10 \times 10 = 100$, where each of them are equally likely. 
Now, we count the number of last digit combinations that lead to $x^2 + y^2$ being divisible by 5. The unordered list of pairs is: $$\{ \{0, 0\}, \{0, 5\}, \{1, 2\}, \{1, 3\}, \{1, 7\}, \{1, 8\}, \{2, 4\}, \{2, 6\}, \{2, 9\}, \{3, 4\}, \{3, 6\}, \{3, 9\}, \{4, 7\}, \{4, 8\}, \{5,5 \}, \{6, 7\}, \{6,8\}, \{7, 9\}, \{8, 9\} \},$$ which is $19$ in all. This leads to $17*2 + 2 = 36$ ordered pairs. 
Therefore, the probability is $\frac{36}{100} = \frac{9}{25}$.
</s>