Let be the greatest integer such that both and are perfect squares. What is the units digit of ?
- A)
- B)
- C)
- D)
- E)
Answer
E
Key insight
Subtracting the two squares gives (b−a)(b+a) = 2560; M is largest when b − a is smallest (2), so a = 639 and M = 639² − 1213.
Solution
Write and with . Subtracting,
The factors and have the same parity, and their product is even, so both are even.
Since , we want as large as possible. From , is largest when the gap is smallest. The smallest even gap is , giving , so and .
Then . For the units digit: ends in , and subtracting a number ending in from one ending in leaves a units digit of . (Indeed .)
The answer is .
Why this works
Two squares with a fixed difference are governed by , so there are only finitely many candidates and the extreme ones come from the extreme factorizations: the closest squares (largest ) use the smallest allowed gap. The parity restriction on the factor pair is the standard subtlety.
The trap
Trying b − a = 1, which makes a non-integer; the two factors must have the same parity, so the smallest usable gap is 2.
Common mistakes
- Trying b − a = 1, which makes a non-integer; the two factors must have the same parity, so the smallest usable gap is 2.
- Computing the units digit as and reading it as ; borrowing gives .
Techniques
Apply an identity: SFFT, sum of squares, difference of cubes, Vieta · Consider the largest/smallest element or boundary case