# Repeated sum of square of digits always arrives at $1$ or $89$

I found an astonishing result in a problem today here !
A number chain is created by continuously adding the square of the digits in a number to form a new number until it has been seen before.

For example,

$44 \to 32 \to 13 \to 10 \to 1 \to 1$

$85 \to 89 \to 145 \to 42 \to 20 \to 4 \to 16 \to 37 \to 58 \to 89$

Therefore any chain that arrives at $1$ or $89$ will become stuck in an endless loop. What is most amazing is that EVERY starting number will eventually arrive at $1$ or $89$.
Why is this true?

• This is similar to the number of letters of a word in english eventually converging to "four" -> "four" -> "four" and in french to "trois"->"cinq"->"quatre"->"six"->"trois". There are only finitely many possibilities so each sum is going to eventually going to stabilize to a repeating loop. Sep 19, 2016 at 20:32
• Note that if the chain remains bounded, it must repeat - if bounded by $N$ then after $N$ operations there will be at least one repeat, and since each number in the chain depends only on the one previous number, the whole chain will repeat. If the numbers in the chain were bounded and depended only on the previous four numbers, there would be only a finite number of sequences of four numbers and therefore a repeat. This is occasionally a useful observation. If there is no repeat, the numbers in the chain grow without limit (are unbounded). Sep 19, 2016 at 21:34