Maths Olympiad Prep

Library / /15 of 26

Number theory Difficulty 4.6 AIME Find the answer United States

Let MM be the greatest integer such that both M+1213M + 1213 and M+3773M + 3773 are perfect squares. What is the units digit of MM?

Pick one

Solutions — 2

Solution 1

Suppose M+1213=j2M + 1213 = j^2 and M+3773=k2M + 3773 = k^2 for nonnegative integers jj and kk. Then
(k+j)(kj)=k2j2=37731213=2560=529. (k + j)(k - j) = k^2 - j^2 = 3773 - 1213 = 2560 = 5 \cdot 2^9.
Because k+jk + j and kjk - j have the same parity and their product is even, they must both be even, and it follows that one of them is 52i5 \cdot 2^i and the other is 29i2^{9-i} for some ii with 1i81 \le i \le 8. Solving for kk gives
k=52i+29i2. k = \frac{5 \cdot 2^i + 2^{9-i}}{2}.
To maximize MM it is sufficient to maximize kk, and this will occur when i=8i = 8 and k=527+1=641k = 5 \cdot 2^7 + 1 = 641. Therefore M=64123773M = 641^2 - 3773, and its units digit is 8.

Because (n+1)2n2=2n+1(n + 1)^2 - n^2 = 2n + 1, successive terms in the sequence of squares, 1, 4, 9, 16, ..., differ by successive odd numbers; and because (n+2)2n2=4(n+1)(n + 2)^2 - n^2 = 4(n + 1), the terms in this sequence that are two apart differ by successive multiples of 4. The two squares required in this problem differ by 37731213=25603773 - 1213 = 2560, a multiple of 4. It follows that the greatest such squares are two apart in the sequence of squares, so n+1=25604=640n + 1 = \frac{2560}{4} = 640. Therefore these squares are n2=6392n^2 = 639^2 and (n+2)2=6412(n + 2)^2 = 641^2, and M+1213=6392M + 1213 = 639^2. Then M=63921213M = 639^2 - 1213, and its units digit is 8.

Solution 2

Because (n+1)2n2=2n+1(n + 1)^2 - n^2 = 2n + 1, successive terms in the sequence of squares, 1,4,9,16,1, 4, 9, 16, \ldots, differ by successive odd numbers; and because (n+2)2n2=4(n+1)(n + 2)^2 - n^2 = 4(n + 1), the terms in this sequence that are two apart differ by successive multiples of 4. The two squares required in this problem differ by 37731213=25603773 - 1213 = 2560, a multiple of 4. It follows that the greatest such squares are two apart in the sequence of squares, so n+1=25604=640n + 1 = \frac{2560}{4} = 640. Therefore these squares are n2=6392n^2 = 639^2 and (n+2)2=6412(n + 2)^2 = 641^2, and M+1213=6392M + 1213 = 639^2. Then M=63921213M = 639^2 - 1213, and its units digit is 8.

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

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