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 nn and creates a sequence of numbers. Each successive number is obtained by subtracting the largest possible integer square less than or equal to the current number until zero is reached. For example, if Jim starts with n=55n = 55, then his sequence contains 55 numbers:

555572=6622=2212=1112=0\begin{array}{ccccc} {}&{}&{}&{}&55\\ 55&-&7^2&=&6\\ 6&-&2^2&=&2\\ 2&-&1^2&=&1\\ 1&-&1^2&=&0\\ \end{array}

Let NN be the smallest number for which Jim’s sequence has 88 numbers. What is the units digit of NN?

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.

Try it yourself first — the explanation is most useful after you’ve attempted it.