Today I worked through the final five problems from the 2010 AMC10 Paper A, an American Maths Challenge. It was the very last problem that turned out to be my favourite:

*Jim starts with a positive integer n 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 = 55, then his sequence contains five numbers: 55, 6, 2, 1, 0.*

*What is the smallest value of n for which his sequence contains eight numbers?*

Solution