2024 AMC 10A Problem 15
Let be the greatest integer such that both and are perfect squares. What is the units digit of ?
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 and , where and are whole numbers and is bigger than .
2. Subtract to get rid of :
3. Factor the difference of squares:
4. What makes large? , so we want as large as possible. The two factors and multiply to a fixed . To make big we want the numbers and close together and large, which means the gap small and the sum large.
5. How small can the gap be? Try : then . But adding the two equations gives , which is not a whole number. In fact and are either both odd or both even (they differ by ). Their product is even, so both must be even. The smallest even gap is .
6. Solve. and . So and .
7. Units digit of . . The units digit of is the units digit of , which is . A number ending in minus a number ending in ends in (think ). (Indeed .)
The answer is .
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 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 .
Review in the AoPS books
- Introduction to Number Theory, Chapter 7: Algebra With Integers
- Introduction to Number Theory, Chapter 1: Integers: The Basics
- Introduction to Algebra, Chapter 11: Special Factorizations
- Introduction to Algebra, Chapter 20: Special Functions (§20.3)
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.