22. [12] Find the number of pairs of integers $(a, b)$ with $1 \leq a<b \leq 57$ such that $a^{2}$ has a smaller remainder than $b^{2}$ when divided by 57 .
Answer: 738
Solution: There are no such pairs when $b=57$, so we may only consider pairs with $1 \leq ab$, for a value of $X=\frac{1}{2}(185-57)=64$.
Therefore the final answer is
$$
\frac{1}{2}\left(\binom{56}{2}-64\right)=738
$$