1
$\begingroup$

Let us first write an arbitrary natural number. For example, $$2538$$ Add the squares of its digits $$2^2 + 5^2 + 8^2 +3^2 = 102$$ Next, we do the same with the number obtained $$1^2 + 0^2 + 2^2 = 5$$ Proceed in the same way

\begin{align} 5^2&=25\\ 2^2+5^2&=29\\ 2^2+9^2&=85\\ 8^2+5^2&=89\\ \vdots \end{align}

Prove that unless this procedure leads to the number $1$ (in which case the number 1 will of course recur indefinitely, it must lead to the number $145$, and the following cycle will occur again and again: $$145, 42, 20, 4, 16 , 37, 58, 89$$

I asked myself the following questions: ''How big can the sum of squares of digits of a three-digit number be''? ''A four-digit number''? ''Can you show that for all sufficiently large numbers, the sum will always be smaller than the original number''? How to prove it? I have no ideas

$\endgroup$
6
  • 1
    $\begingroup$ Hint: How big can the sum of squares of digits of a three-digit number be? A four-digit number? Can you show that for all sufficiently large numbers, the sum will always be smaller than the original number? After that, it just comes down to some awkward calculation. $\endgroup$ Sep 26, 2019 at 16:56
  • $\begingroup$ I already asked myself these questions! I think it's really a weird calculation $\endgroup$
    – trombho
    Sep 26, 2019 at 16:57
  • 1
    $\begingroup$ It is kind of a weird calculation — but that should maybe not be too surprising! Digits (arguably) aren't an innate property of a number, just a property of a representation of a number, so we shouldn't necessarily expect questions involving them to behave very nicely. $\endgroup$ Sep 26, 2019 at 17:01
  • 1
    $\begingroup$ @EsposaDoYoongi If you already asked yourself those questions, you should give yourself more credit and include them in your question rather than claim you have no ideas. Those ideas are perfectly worth mentioning. $\endgroup$
    – Erick Wong
    Sep 26, 2019 at 17:15
  • 1
    $\begingroup$ I have taken the liberty to change your too neutral title "An interesting property of numbers" into a more significant one in order to direct much more people on your question in the future... $\endgroup$
    – Jean Marie
    Sep 29, 2019 at 7:26

2 Answers 2

4
$\begingroup$

First, determine when the algorithm of summing squares of digits must give a result with fewer digits than the starting number. A number with $n$ digits cannot yield a sum of the squares of its digits greater than $81n$ and that happens when each digit is $9$. A number with $n$ digits is $>10^{n-1}$. So if $81n<10^{n-1}$, the algorithm will yield a number with fewer digits than the starting number. You can see that this occurs for $n\ge 4$ but not for $n=3$; $324<1000\text{ but }243>100$. So numbers with $4$ or more digits will yield shorter results, meaning any starting number will eventually arrive at a number with $3$ or fewer digits.

The largest possible three digit number is $999$, which yields $243$, so any number from $244$ to $999$ will yield a number of $243$ or smaller, therefore you only need concern yourself with numbers from $1$ to $243$. You could push this kind of analysis further, but there is no need. Once you have a number within that range, summing the squares of its digits will always yield another number within that range. If you repeat the algorithm $243$ or more times, either the resulting numbers will converge (as you suggest, to $1$), or there will have to be a repeat; more than $243$ results all within the first $243$ numbers means a repeat of some kind, either a convergence or a cycle, is forced. You have already identified such a cycle. The only open question is whether the cycle you identified is the only possible one.

$\endgroup$
1
$\begingroup$

Considering starting numbers from 1 to 999, I confirm that a vast majority of sequences (almost 86%) fall into cycle :

145, 42, 20, 4, 16, 37, 58, 89, 145

All the other ones are trapped sooner or later into the "well" $1$.

using the following Matlab simulation :

 k=floor(999*rand);
 for i=1:25;
    T(i)=k;L=num2str(k)-'0';k=sum(L.^2);
 end
 T

Connected : https://www.johndcook.com/blog/2018/03/24/squared-digit-sum/ and square of digits - why does it always contain 1 or 89

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .