[Problem 6, Higher Secondary 2010]:
\(a\) and \(b\) are two positive integers both less than \(2010\); \(a \neq b\). Find the number of ordered
pairs \((a, b)\) such that \(a^2 + b^2\) is divisible by \(5\).
Solution:
Let's examine the squares of integers modulo 5:
\begin{align}
1^2 &\equiv 1 \pmod{5} \\
2^2 &\equiv 4 \pmod{5} \\
3^2 &\equiv 4 \pmod{5} \\
4^2 &\equiv 1 \pmod{5} \\
5^2 &\equiv 0 \pmod{5}
\end{align}
The pattern \((1, 4, 4, 1, 0)\) repeats for all integers.
Identify conditions for \(a^2 + b^2\) to be divisible by 5:
Case 1: Both numbers square to 0 (mod 5)
Case 2: One number squares to 1 and the other to 4 (mod 5)
Since the question asks for ordered pairs, we need to double our count for both cases.
There are 402 numbers that square to 0 (mod 5) within the range 1 to 2010 because there are 402 complete blocks of 5 numbers, and in each block, the last number squares to 0 (mod 5).
For each of 1 and 4 (mod 5), there are 804 numbers within the range 1 to 2010 that square to these values. This is because there are 402 complete blocks of 5 numbers, and in each block, there are 2 numbers that square to 1 (mod 5) and 2 numbers that square to 4 (mod 5).
Answer:
\( \dbinom{402}{2} \times 2 + \dbinom{804}{1} \times \dbinom{804}{1} \times 2\)