2025 AMC 10B Problem 2
Jerry wrote down the ones digit of each of the first positive squares: . What is the sum of all the numbers Jerry wrote down?
Show solution without answering
Key insight
The last digit of a square depends only on the last digit of the number, so the list repeats every ten terms, and each block of ten adds to 45.
Solution
- Write out the first ten. Square through and keep only the ones digit:
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | |
|---|---|---|---|---|---|---|---|---|---|---|
| ones digit of | 1 | 4 | 9 | 6 | 5 | 6 | 9 | 4 | 1 | 0 |
These add up to .
- Why the list repeats. When you multiply, the ones digit of the answer comes only from the ones digits of the numbers. For example, ends in , just like . So squares of to end in the same ten digits again, and so do to , and so on. Every block of ten adds to .
3. Count the full blocks. . So to makes full blocks, worth
- Add the leftovers. The last five numbers are . They end in , so their squares end in , which add to .
- The total is .
The answer is .
Why this works
A last digit never cares about the digits in front of it, so a sum of last digits over a huge range is really one short block repeated. The recipe: find how often the pattern repeats, add one block, multiply by the number of full blocks, and finish the partial block by hand. The partial block at the end is the part people forget.
Concise solution
A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.
The ones digit of is determined by the ones digit of , so Jerry's list repeats with period . Squaring gives ones digits
which sum to .
Now split . The squares of through form complete blocks, contributing
The remaining terms come from , whose ones digits are ; their squares end in , a further .
The total is .
The answer is .
Review in the AoPS books
- Introduction to Number Theory, Chapter 12: Introduction to Modular Arithmetic
- Introduction to Algebra, Chapter 21: Sequences & Series (§21.1, §21.2, §21.3, §21.4)
- Prealgebra, Chapter 15: Problem-Solving Strategies (§15.1)
- Introduction to Number Theory, Chapter 10: Units Digits
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.