Hi all, I've been playing around with an idea and thought I would share it. Begin with a non-negative integer n. Then iterate: - Find the nearest square to n. This will either be (floor(sqrt(n)))^2 or (floor(sqrt(n))+1)^2. - If the square is more than n, then the new n = n + square. Otherwise, n = n - square. - If n > 0, continue iterating, otherwise, stop. As an example, the trajectory of 15 is: 1. 31 (add the nearest square 16) 2. 67 (add the nearest square 36) 3. 3 (subtract 64) 4. 7 (add 4) 5. 16 (add 9) 6. 0 (subtract 16). How many iterations are required to get to 0, for a given starting value? The number of iterations rises slowly and erratically, with n = 820 needing 16 and n = 9709 needing 20 (both highwater marks). Of course, if n is a perfect square, then it only takes one iteration to get to 0. Do all initial values of n lead to 0? I think so, but I can't prove it. The largest number of iterations I've seen is 47 for n = 38,034,564,952 (I've checked up to 100,000,000,000, using Pari). If this is interesting, I can submit sequences for a(n) = the number of iterations for trajectories starting with n and for a(n) = the smallest initial value to require n iterations. Kerry