Maths Olympiad Prep

Library / HMMT November /554 of 672

HMMT November, 2022

Number theory Difficulty 5.3 AIME, harder Prove it United States

Problem:
Find the number of pairs of integers (a,b)(a, b) with 1≤a<b≤571 \leq a < b \leq 57 such that a2a^{2} has a smaller remainder than b2b^{2} when divided by 5757.

Solution

Solution:
There are no such pairs when b=57b=57, so we may only consider pairs with 1≤a<b≤561 \leq a < b \leq 56. The key idea is that unless a2 mod 57=b2 mod 57a^{2} \bmod 57 = b^{2} \bmod 57, (a,b)(a, b) can be paired with (57−b,57−a)(57-b, 57-a) and exactly one of them satisfies a2 mod 57<b2 mod 57a^{2} \bmod 57 < b^{2} \bmod 57. Hence if XX is the number of pairs (a,b)(a, b) with 1≤a<b≤561 \leq a < b \leq 56 and a2≡b2(mod57)a^{2} \equiv b^{2} \pmod{57}, then the answer is
12((562)−X) \frac{1}{2}\left(\binom{56}{2} - X\right)
To count XX, let's first count the number of pairs (a,b)(a, b) with 1≤a,b≤571 \leq a, b \leq 57 and a2≡b2(mod57)a^{2} \equiv b^{2} \pmod{57}. By the Chinese Remainder Theorem, the condition is equivalent to (a−b)(a+b)≡0(mod3)(a-b)(a+b) \equiv 0 \pmod{3} and (a−b)(a+b)≡0(mod19)(a-b)(a+b) \equiv 0 \pmod{19}. There are 2⋅3−1=52 \cdot 3 - 1 = 5 pairs of residues modulo 33 where (a−b)(a+b)≡0(mod3)(a-b)(a+b) \equiv 0 \pmod{3}, namely (0,0),(1,1),(2,2),(1,2),(2,1)(0,0), (1,1), (2,2), (1,2), (2,1). Similarly, there are 2⋅19−1=372 \cdot 19 - 1 = 37 pairs of residues modulo 1919 where (a−b)(a+b)≡0(mod19)(a-b)(a+b) \equiv 0 \pmod{19}. By the Chinese Remainder Theorem, each choice of residues modulo 33 for aa and bb and residues modulo 1919 for aa and bb corresponds to unique residues modulo 5757 for aa and bb. It follows that there are 5⋅37=1855 \cdot 37 = 185 such pairs. To get the value of XX, we need to subtract the 5757 pairs where a=ba = b and divide by 22 for the pairs with a>ba > b, for a value of X=12(185−57)=64X = \frac{1}{2}(185 - 57) = 64.
Therefore the final answer is
12((562)−64)=738 \frac{1}{2}\left(\binom{56}{2} - 64\right) = 738

Want a route through all this instead of an archive? The track puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.