AMC 10 · 2024 · #9

Grade 8 number-theoryalgebra
perfect-squaresfactorsunits-digit-trackingsystematic-enumeration convert-to-algebraunits-digit-trackingcasework ↑ Prerequisites: perfect-squaresprime-factorizationmulti-digit-arithmetic
📏 Short solution 💡 3 insights
Problem
Find the largest integer M such that M + 1213 and M + 3773 are both perfect squares. Then report the units digit of M.

Pick an answer.

(A)
1
(B)
2
(C)
3
(D)
6
(E)
8
How to solve
Strategy Convert to Algebra

The phrase "both ... are perfect squares" names two unknown squares with a fixed difference — exactly the trigger for Tool #13 (Convert to Algebra): give the two squares names a² and b², subtract to eliminate M, and the unknowns are now an integer pair (a,b) with b² - a² = 2560. The difference of squares factors that into (b-a)(b+a) = 2560, turning the squares problem into a factor-pair problem. Tool #7 (Identify Subproblems) then splits the work cleanly: first find a from the right factor pair (max M comes from the most lopsided pair), then turn a into the units digit using only the ones-digit arithmetic of a² - 1213.

1STEP 1

Cancel M

Subtracting leaves a square difference of 2560.

b² - a² = (M+3773) - (M+1213) = 2560
2STEP 2

Factor it

The two factors must share the same parity.

(b-a)(b+a) = 2560, b-a ≡ b+a (mod 2)
3STEP 3

Pick the largest M

A gap of 2 makes the squares largest.

b - a = 2, b + a = 1280 → b = 641, a = 639
4STEP 4

Read the units digit

Squaring 639 and subtracting 1213 ends in 8.

M ≡ a² - 1213 ≡ 9² - 3 ≡ 1 - 3 ≡ -2 ≡ 8 (mod 10) → (E)
Answer
8
Spot-check the algebra end-to-end. With a = 639, M = 639² - 1213 = 408,321 - 1,213 = 407,108, whose units digit is indeed 8. Also check the other condition: M + 3773 = 407,108 + 3,773 = 410,881 = 641². Both conditions hold and the ones digit lines up with answer (E). Maximality check: any other valid even factor pair of 2560 — for example 4 × 640 — gives a = 318 < 639 and a smaller M, confirming 2 × 1280 is optimal.
💡Key takeaway

When two perfect squares have a fixed difference, factor that difference — the factor pair you pick is exactly the system b-a = x, b+a = y that solves for the two square roots. Lopsided pairs give the largest squares.