Problem 92
Square digit chains
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,
$$
\begin{aligned}
& 44 \rightarrow 32 \rightarrow 13 \rightarrow 10 \rightarrow \textbf{1} \rightarrow \textbf{1}\\
& 85 \rightarrow \textbf{89} \rightarrow 145 \rightarrow 42 \rightarrow 20 \rightarrow 4 \rightarrow 16 \rightarrow 37 \rightarrow 58 \rightarrow \textbf{89}
\end{aligned}
$$
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$.
How many starting numbers below ten million will arrive at $89$?
平方数链
从任意一个数开始,不断取其各位数字的平方和,直到出现重复,就得到了一条数链。
例如:
$$
\begin{aligned}
& 44 \rightarrow 32 \rightarrow 13 \rightarrow 10 \rightarrow \textbf{1} \rightarrow \textbf{1}\\
& 85 \rightarrow \textbf{89} \rightarrow 145 \rightarrow 42 \rightarrow 20 \rightarrow 4 \rightarrow 16 \rightarrow 37 \rightarrow 58 \rightarrow \textbf{89}
\end{aligned}
$$
如上所示,只要数链中出现$1$或$89$,之后就会进入循环。最令人惊奇的是,从任意一个数开始,最终都必定会到达$1$或$89$。
从任意小于一千万的数开始,有多少个最终会到达$89$?