I'm familiar with what happens when the operation of sum of the digits squared is applied repeatedly to a number. Either the number 1 is reached or the loop {4, 16, 37, 58, 89, 145, 42, 20} is entered. Numbers that reach 1 are called happy numbers and I wrote about these in a blog post on June 26th 2018 titled Happy Numbers.
I hadn't considered what happens when the operation of digit sum squared is repeatedly applied. Let's highlight the difference between the two operations using my diurnal age of 26548 as an example.$$26548 \rightarrow 2^2+6^2+5^2+4^2+8^2=4+36+25+16+64=145\\26548 \rightarrow (2+6+5+4+8)^2=25^2=625$$In the case of the sum of the digits squared, it can be seen that continuing the operation leads to a loop because:$$145 \rightarrow 1^2+4^2+5^2=42$$However, in the case of the square of the digit sum, a loop is also entered because:$$625 \rightarrow (6+2+5)^2 = 169 \rightarrow (1+6+9)^2=256 \rightarrow (2+5+6)^2=169$$Nearly 45% of all numbers will enter this loop. Another 33% will end in 81. For example, 26547 follows this trajectory:$$26547 \rightarrow 576 \rightarrow 324 \rightarrow 81$$Another 22% will end in 1 and, in general, it seems that all numbers will either end in 1 or 81 or enter the loop {169, 256]. Here is a permalink to SageMathCell that will confirm this. The algorithm is easily modifiable to accommodate powers greater than 2 and so what happens if the digit sum is repeatedly raised to the third, fourth, fifth powers etc. can be investigated. Let's look next at the digit sum cubed.
What we find is that almost 32% of numbers enter the loop {6859, 21952}:$$6859 \rightarrow 28^3=21952 \rightarrow 19^3=6859$$All other numbers end in 1, 512, 4913, 5832, 17576 or 19683 with percentages of approximately 1.5%, 7.6%, 13.0%, 25.7%, 12.7% and 7.5% respectively:$$ \begin{align} 1 \rightarrow 1^3 &= 1\\512 \rightarrow 8^3 &= 512\\4913 \rightarrow 17^3 &= 4913\\5832 \rightarrow 18^3 &= 5832\\17576 \rightarrow 26^3 &= 17576\\19683 \rightarrow 27^3 &=19683 \end{align}$$When we raise the digit sum repeatedly to the fourth power, we find that again that some numbers enter the loop {104976, 531441}, about 33% in total:$$104976 \rightarrow 27^4= 531441 \rightarrow 18^4 = 104976$$All other numbers end in 1, 2401, 234256, 390625, 614656 or 1679616 with approximate percentages of 12.1%, 6.0%, 22.2%, 16.2%, 10.1% and 0.7% respectively:$$ \begin{align}1 \rightarrow 1^4 &= 1\\2401 \rightarrow 7^4 &= 2401\\234256 \rightarrow 22^4&= 234256\\ 390625 \rightarrow 25^4&= 390625\\614656 \rightarrow 28^4 &=614656\\ 1679616 \rightarrow 36^4 &=1679616 \end{align}$$When we raise the digit sum repeatedly to the fifth power, about 56% of numbers enter the loops {16807, 5153632, 9765625, 102400000} or {6436343, 20511149} or {28629151, 45435424}. All other numbers end in 1, 17210368, 52521875, 60466176 or 205962976 with approximate percentages of 1.0%, 4.3%, 11.1%, 33.3% and 5.8% respectively:$$ \begin{align}1 \rightarrow 1^5 &= 1\\17210368 \rightarrow 28^5 &= 17210368\\52521875 \rightarrow 35^5 &= 52521875\\60466176 \rightarrow 36^5&= 60466176\\205962976 \rightarrow 46^5 &=205962976\end{align}$$I could go on but the general pattern is clear.
No comments:
Post a Comment