Skip to main content

2017 AIME I Problem 2

Problem 2 of 15EasierNumber Theory

When each of 702,702, 787,787, and 855855 is divided by the positive integer m,m, the remainder is always the positive integer r.r. When each of 412,412, 722,722, and 815815 is divided by the positive integer n,n, the remainder is always the positive integer s≠r.s \neq r. Find m+n+r+s.m + n + r + s.

Your answer

Integer from 0 to 999
Show solution

Solution

Numbers leaving equal remainders upon division by mm differ by multiples of m,m, so mm divides both 787−702=85787 - 702 = 85 and 855−787=68.855 - 787 = 68. Since gcd⁡(85,68)=17\gcd(85, 68) = 17 and mm must exceed the positive remainder r,r, we get m=17,m = 17, and r=702−41⋅17=5.r = 702 - 41 \cdot 17 = 5. Similarly nn divides both 722−412=310722 - 412 = 310 and 815−722=93,815 - 722 = 93, and gcd⁡(310,93)=31,\gcd(310, 93) = 31, so n=31n = 31 and s=412−13⋅31=9,s = 412 - 13 \cdot 31 = 9, which indeed differs from r.r. The requested sum is 17+31+5+9=62.17 + 31 + 5 + 9 = 62.
AoPS wiki

Tagged: greatest common divisor · modular arithmetic · divisibility

More practice