Loading [MathJax]/jax/output/HTML-CSS/jax.js

Thursday, 9 December 2021

Digit Sum Raised to Integer Powers

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.2654822+62+52+42+82=4+36+25+16+64=14526548(2+6+5+4+8)2=252=625In the case of the sum of the digits squared, it can be seen that continuing the operation leads to a loop because:14512+42+52=42However, in the case of the square of the digit sum, a loop is also entered because:625(6+2+5)2=169(1+6+9)2=256(2+5+6)2=169Nearly 45% of all numbers will enter this loop. Another 33% will end in 81. For example, 26547 follows this trajectory:2654757632481Another 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}:6859283=21952193=6859All 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:113=151283=5124913173=49135832183=583217576263=1757619683273=19683When 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:104976274=531441184=104976All 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:114=1240174=2401234256224=234256390625254=390625614656284=6146561679616364=1679616When 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:115=117210368285=1721036852521875355=5252187560466176365=60466176205962976465=205962976I could go on but the general pattern is clear.

No comments:

Post a Comment