Sunday, 15 November 2020

Another OEIS Submission

After tinkering with this sequence for a couple of weeks, I decided to submit it to the OEIS in its original form. I'd tried various ways to make it more interesting but, in the end, it was its inherent simplicity that won out. Here it is:$$a_n=\text{ sum of digits of }\big (a_{n-1} \big )^{a_{n-2}} \text{ where } a_0=1 \text{ and } a_1=2$$I was able to use SageMathCell to generate the terms up to and including \(a_{17}\) but after that the algorithm times out. Here is a permalink with the SageMath code (in blue) and the output (in red) as follows:

a, b=1,2
L=[a, b]
for n in [1..17]:
c=b^a
c=sum(c.digits())
L.append(c)
a, b=b, c
print(L)

[1, 2, 2, 4, 7, 7, 25, 34, 151, 331, 1690, 3265, 26449, 64528, 574513, 1671208, 16090657, 54199564, 559922497] 

Without the sum of digits, this exponentiation would become too large too quickly and the resultant sequence would be fairly meaningless. The sum of digits brings the exponent back to a much lower number but, even so, by \(n=17\) the term is more than half a billion. In my submission, I was able to provide a link to GeeksforGeeks that shows the code to calculate the sum of digits of a given number to a given power in Python3, C++, Java, C# and PHP. Maybe this will give my submission a little more weight. See Figure 1 for a screenshot.

Figure 1

I'm well aware that this is quite a simple sequence but it will have to do until I come up with something like the Collatz or PrimeLatz trajectory sequences. I'll keep trying. Meanwhile, it will be interesting to see how my submission is greeted by the guardians of OEIS who guard their sequences jealously and are suspicious of newcomers. I'll add to this post as news arrives. Here is a link to my previous contribution: OEIS A335789 under the name Sean Lestrange (August 14th 2020). I have an earlier entry, OEIS A301938, under the name Sean Reeves (March 28th 2018). As to the name change, well that's another story.

UPDATE: well, that was quick. When I checked today (16th November 2020), the sequence had already been approved: OEIS A338917. See Figure 2:

Figure 2

No comments:

Post a Comment