# Iterated sum of squares of digits starting from one digit, how many digits can we reach (max)?

Inspired by this question I was wondering that if/when we reach one digit, what is the largest number of digits we can reach before reaching 1 digit again? Can we show there must be a bound? If so, would that bound be dependent on the basis?

Example how high we can reach from 1 digit number 8 in basis 10:

$$8^2 = 64\\ 6^2 + 4^2 = 52\\ 5^2+2^2 = 29\\ 2^2+9^2 = 85\\ 8^2+5^2 = 89\\ 8^2+9^2 = 145\\ \text{( now sure to reach at least 3 digits )}\\\vdots\\\text{keep going until back to 1 digit}\\\vdots$$

• Since $81\times 3<1000$ no three digit number can ever become a four (or higher) digit number... – lulu Apr 4 '17 at 18:07

## 1 Answer

Following Lulu's line of thought: What is the maximum number you can reach from a number with at most $n-1$ digits in base $b$?

It is clearly $(n-1)(b-1)^2$, on the other hand, the smallest $n$ digit number is $b^{n-1}$.

This clearly shows that no $n$-digit number can be reached if $n\leq \frac{b^{n-1}}{(b-1)^2}+1$.

It is easy to prove that $4\leq \frac{b^3}{(b-1)^2}+1$ for all $b$. So you will never rach a number of $4$ digits in any base.