Pairs and squares

This puzzle, which I posted to twitter (@puzzlecritic) a few weeks ago, is one of my variations on a problem that appeared in a mathematical discussion group on LinkedIn:

Find three different positive integers such that the sum of any two is a square.



Takeaway squares

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?