Friday 24 February 2023

26990: Reverse and Add

I first posted on the topic of Reverse and Add on the 7th January 2016, less than six months after I started this blog. The post was titled 22, Reverse and Add, and later that year (22nd June 2016)  I made a post titled Remembering Reverse and Add, Palindromes and Trajectories. The post titled Lychrel Numbers on 14th September 2016 is also relevant. Since 2016 I've touched on the topic in several other posts.

Today I turned 26990 days old and one of the properties of this number is that it's a member of OEIS A065318:


 A065318

24 'Reverse and Add' steps are needed to reach a palindrome.



Such a large number of steps is uncommon as can be seen from the membership:

89, 98, 16991, 17981, 18971, 19961, 26990, 27980, 28970, 29960, 50169, 51159, 52149, 53139, 54129, 55119, 56109, 56199, 57189, 58179, 59169, 60168, 60649, 61158, 61639, 62148, 62629, 63138, 63619, 64128, 64609, 64699, 65118, 65689, 66108, 66198, 66679, 67188, 67669, 68178, 68659, 69168, 69649, 70167, 70648, 71157, 71638, 72147, 72628, 73618, 74127, 74608, 74698, 75117, 75688, 76107, 76197, 76678, 77187, 77668, 78177, 78658, 79167, 79648, 80166, 80339, 80499

To get an overview of what's going on, I plotted the length of the trajectories of all numbers from 1 to 40000. The result is shown in Figure 1 where the initial members of the sequence (89, 98, 16991, 17981, 18971, 19961, 26990, 27980, 28970, 29960) are clearly visible along the red line.


Figure 1: permalink

The calculation timed out in SageMathCell and so the plot was created using my Jupyter notebook which has proven invaluable for computationally intense tasks. Sometimes the kernel will crash and the tasks cannot be completed but this is not all that common. The plot also shows how rare trajectory lengths of 24 and above are. Figure 2 shows a similar plot both this time in the range up to 100,000. As can be seen, the numbers that have trajectory lengths of 24, while initially scarce, become more frequent between 50,000 and 100,000. Some other trajectory red lines have also been marked in addition to that of 24.


Figure 2

Figure 3 shows the trajectories for numbers up to one million. Notice how the trajectory 24 numbers are fairly numerous between 50,000 and 500,000 but after that there is a gap followed by three equally spaced groups and then no numbers after about 800,000. Again, this plot was only achieved using a Jupyter notebook and letting my old 2013 laptop crunch away at the calculation.


Figure 3

As the range gets larger, new trajectory lengths begin to appear. For example, a group of numbers in equally spaced clumps appear with trajectory length 64 between about 180,000 and 820,000.

No comments:

Post a Comment