## Friday 16 December 2022

### Chain, Chain, Chain, ...Chain of squares..

Or "Where Does This Road End?"... guess Rick Regan over at Exploring Binary will like this.. and I think the actual next line in that song was "chain of fools", (rock me, Aretha) and yet I continue....

If you take a number, square each of its digits and find the sum you will get a new number(usually, is there more than one number that produces itself as its own iterate under this process). Do the same to that number, and the sequence continues. But eventually you have to come back where you started. Numbers with more than three digits will always produce a smaller number and three digit numbers will always be less than 92+92+92= 243, so eventually, wherever you start, you end up with a number less than 243 (and 243 --> 4+16+9 = 29 so it gets even smaller).. what would be the last number that produces a number larger than itself?

Ok, simple stuff, if you start with one, you get one and that's dull so let's go on. If you begin with two you produce the sequence 2--> 4--> 16--> 37--> 58--> 89--> 145-->42-->20-->4 and then repeats the cycle of eight numbers forever. Now the big conjecture... start with ANY integer (oooohhhh, he said you could pick ANY integer, how bold) and eventually, either it gets to one, or it jumps into this chain. Now I wonder; is there a way to prove (short of hacking them all out, which I have done) that there is no "other" chain that some numbers might drop into? I also have a feeling that as the numbers go off to infinity, the proportion of numbers that go off to one has some non-zero limit; in fact, I suspect it might be around 1/7 or just a tiny bit more, but don't have a clue how to prove that (Joshua Zucker said..."I have no rationale as yet, but my computer search seems to tell me that the proportion is more like 21% than 1/7."... Well Josh, I did say "or just a tiny bit more"...).

In 2015 a revision of a paper by Justin Gilmer arrived at a value between d <.18577 and d>.1138.   (arXiv:1110.3836)

Numbers which eventually end on one are called Happy Numbers, and their origin is unclear.  Wikipedia has, " are Happy numbers were brought to the attention of Reg Allenby (a British author and senior lecturer in pure mathematics at Leeds University) by his daughter, who had learned of them at school. However, they "may have originated in Russia" .  Both these are cited from Richard Guy in 2004.

"Guy asks several questions about happy numbers which can be paraphrased as follows:

(a) It seems that about 1/7 of all numbers are happy, but what bounds on the density can be proved?

(b) How many consecutive happy numbers can you have? Can there be arbitrarily many?   (The first consecutive pair of Happy numbers is 31,32.The first triplet  starts at 1880.)

(c) We define the height of a happy number to be the least number of iterations needed to reach 1. How big is the least happy number of height h?   (Happy numbers seem to get there pretty quickly.  the first 100 happy numbers, (up to 694, I think) never takes more than seven iterations)

(d) What if we replace squares by cubes, fourth powers, fifth powers etc., or we work in different bases?

Some of these questions have been answered at the Online Encyclopedia of Integer Sequences

I have found the term "happy numbers"used in the same manner back to 1970, in Bulletin (28 - 30),pg 2, of the California Mathematics Council.  (Would love to receive digital copy if one can be had.  Seems to be early plug for computer mathematics in high school.)

I looked into forming the sum of the cube of the digits... would all roads lead back to one or two then? A quick answer trying only a few numbers... NO, Follow the orbits of 2 or 3 or 7 and they all go to separate self-replicating numbers or one-cycles.. 4 goes into a triplet of 55 250,133,55; so I guess my new question about cubics is...

It seems that any (many?) number 2+3n goes to the same absorbing point as 2 (371).

All multiples of 3 go to a fixed point of 153, 9, 12, 18, 21, 24, 27, 30, 33.  The others seem to go to the cycle from 4, (133,55,250,133) (not sure if there are more of these).

19, 34, 37,    (of course 43, 70, 73, 91, 109 .. would go there as well.)  go to the fixed point of 7 (370).
This seems to explain everything, then you get to 47, and it has a fixed point of 470. And then 49 goes to 1459 and oscillates between 1459 and 919.

That 370, 371 and 470 all are fixed points makes them Armstrong numbers, numbers that produce themselves when each digit is raised to the number of digits it has (in this case 3).