AMC 10 Step by Step

2024 AMC 10A Problem 15

P11-15~4 minPrint

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 ?

Log in to save your progress.
Show solution without answering

Key insight

The two squares differ by 2560 = (b − a)(b + a). M is biggest when a is biggest, which needs the smallest gap b − a.

Solution

1. Name the squares. Write M+1213=a2M + 1213 = a^2 and M+3773=b2M + 3773 = b^2, where aa and bb are whole numbers and bb is bigger than aa.
2. Subtract to get rid of MM:
b2−a2=3773−1213=2560.b^2 - a^2 = 3773 - 1213 = 2560.
3. Factor the difference of squares:
(b−a)(b+a)=2560.(b - a)(b + a) = 2560.
4. What makes MM large? M=a2−1213M = a^2 - 1213, so we want aa as large as possible. The two factors b−ab - a and b+ab + a multiply to a fixed 25602560. To make aa big we want the numbers aa and bb close together and large, which means the gap b−ab - a small and the sum b+ab + a large.
5. How small can the gap be? Try b−a=1b - a = 1: then b+a=2560b + a = 2560. But adding the two equations gives 2b=25612b = 2561, which is not a whole number. In fact b−ab - a and b+ab + a are either both odd or both even (they differ by 2a2a). Their product 25602560 is even, so both must be even. The smallest even gap is 22.
6. Solve. b−a=2b - a = 2 and b+a=2560÷2=1280b + a = 2560 \div 2 = 1280. So b=641b = 641 and a=639a = 639.
7. Units digit of MM. M=6392−1213M = 639^2 - 1213. The units digit of 6392639^2 is the units digit of 9⋅9=819 \cdot 9 = 81, which is 11. A number ending in 11 minus a number ending in 33 ends in 88 (think 11−3=811 - 3 = 8). (Indeed M=408321−1213=407108M = 408321 - 1213 = 407108.)

The answer is (E) 8\boxed{\textbf{(E)}\ 8}.

Why this works

Two squares that differ by a fixed amount always lead to (difference)(sum) == that amount, so there are only a few possible pairs. The largest squares come from the pair with the smallest gap. The usual catch is odd and even: the difference and the sum of two whole numbers are both odd or both even, so not every factor pair is allowed.

Concise solution

A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.

Write M+1213=a2M + 1213 = a^2 and M+3773=b2M + 3773 = b^2 with 0≤a<b0 \le a < b. Subtracting,
b2−a2=(b−a)(b+a)=2560=29⋅5.b^2 - a^2 = (b - a)(b + a) = 2560 = 2^9\cdot 5.
The factors b−ab - a and b+ab + a have the same parity, and their product is even, so both are even.

Since M=a2−1213M = a^2 - 1213, we want aa as large as possible. From a=(b+a)−(b−a)2a = \frac{(b+a) - (b-a)}{2}, aa is largest when the gap b−ab - a is smallest. The smallest even gap is b−a=2b - a = 2, giving b+a=1280b + a = 1280, so a=639a = 639 and b=641b = 641.

Then M=6392−1213M = 639^2 - 1213. For the units digit: 6392639^2 ends in 92=81→19^2 = 81 \to 1, and subtracting a number ending in 33 from one ending in 11 leaves a units digit of 88. (Indeed M=408321−1213=407108M = 408321 - 1213 = 407108.)

The answer is (E) 8\boxed{\textbf{(E)}\ 8}.

Review in the AoPS books

Similar problems

Problem © Mathematical Association of America (MAA), American Mathematics Competitions. Reproduced for non-commercial educational use. Solution and commentary are original to this site.