AMC 10 · 2010 · #25

Grade 7 number-theory
perfect-squaresgreedy-algorithmunits-digit-tracking work-backwards ↑ Prerequisites: perfect-squares
📏 Medium solution 💡 3 insights
Problem
Jim starts with a positive integer and repeatedly subtracts the largest perfect square that is not larger than the current number, stopping only when he reaches 0. The start, every in-between value, and the final 0 together form a list. Let N be the smallest starting value whose list is exactly 8 numbers long. Report the units digit of N.

Pick an answer.

(A)
$\ 1$
(B)
$\ 3$
(C)
$\ 5$
(D)
$\ 7$
(E)
$\ 9$

AMC 10 2010 problem © Mathematical Association of America (MAA AMC). Reproduced for educational use.

How to solve
Strategy Work Backwards

Going forward is hopeless: we would have to test starting numbers one by one until one happens to take 7 subtractions. The end of every list is the same — it is always 0 — so Tool #11 (Work Backwards) fits perfectly. We start at 0 and grow the list one term at a time, and at each stage we ask for the smallest number that could sit above the current one. To answer that we need Tool #4 (Introduce a Variable): call the square that gets subtracted s² and turn the phrase 'largest square not exceeding the value' into an inequality on s. Tool #14 (Extreme Principle) is what lets us trust the greedy choice — because the smallest predecessor grows when its target grows, taking the smallest option at every step really does give the smallest N overall. Finally Tool #3 (Eliminate Possibilities) closes it: only one answer choice matches the units digit we compute.

1STEP 1

Count steps, not numbers

8 numbers means 7 subtractions. Every list ends at 0, so start at 0 and build upward, keeping each new row as small as possible.

8 numbers = 7 subtractions, bottom row = 0
2STEP 2

Rule for the smallest predecessor

If a row holds c, the row above is c+s². For s² to stay the largest square, c+s² must be under (s+1)², so s is at least half of c.

c+s² < (s+1)² → c < 2s+1 → s ≥ c/2
3STEP 3

Build the chain upward

Apply the rule seven times, always adding the smallest legal square: 1,1,1,4,16,144,7056. The chain climbs 0,1,2,3,7,23,167,7223.

0 → 1 → 2 → 3 → 7 → 23 → 167 → 7223
4STEP 4

Why 7223 is truly the smallest

A bigger target always needs a bigger predecessor, so taking the smallest at every row gives the smallest top number, 7223.

N = 167 + 84² = 167 + 7056 = 7223
5STEP 5

Read the units digit

Only the units digit is asked, and 7223 ends in 3 — exactly one answer choice matches.

units digit of 7223 = 3 → (B)
Answer
3
Run Jim's actual process forward on 7223: the largest square ≤ 7223 is 84²=7056, leaving 167; then 12²=144 leaves 23; then 4²=16 leaves 7; then 2²=4 leaves 3; then 1,1,1 subtract down through 2,1,0. The list is 7223,167,23,7,3,2,1,0 — exactly 8 numbers, confirming the count. Any smaller start must, by the increasing-predecessor argument, produce a shorter list, so 7223 is the minimum and its units digit 3 gives (B).
💡Key takeaway

Build the chain up from 0 and always add the smallest square that keeps the same subtraction — the top of the shortest-growing ladder is the smallest starting number.

  • Count steps, not numbers
  • Rule for the smallest predecessor
  • Build the chain upward
  • Why 7223 is truly the smallest
  • Read the units digit