Saturday, 21 August 2021

Analysis of a Recursive Process

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


 A048128

Becomes prime or 4 after exactly 6 iterations of f(x) = sum of prime factors of x.


Approximately 10.7% of the numbers in the range up to 26438 satisfy this criterion. The sum of the prime factors is calculated with multiplicity. I was encouraged to investigate how this percentage changed as the number of iterations decreased and increased from six. I decided to increase the range up to 100,000. In this range, the percentage increases to 12.63%. Here is a permalink to the algorithm that I developed in SageMathCell to calculate these percentages.


The results for the various iterations were as follows:
  • 0:   09.59%
  • 1:   12.29%
  • 2:   15.21%
  • 3:   15.24%
  • 4:   13.44%
  • 5:   15.31%
  • 6:   12.63%
  • 7:   04.89%
  • 8:   01.18%
  • 9:   00.21%
  • 10: 0.020%
  • 11: 0.020%
No number between 1 and 100,000 survives 12 iterations. Only two numbers survive 11 iterations and these are 27933 and 55694. Let's look at the trajectory of these two numbers. 
  • 27933, 9314, 4659, 1556, 393, 134, 69, 26, 15, 8, 6, 5
  • 55694, 27849, 9286, 4645, 934, 469, 74, 39, 16, 8, 6, 5


As can be seen, both end in the prime number 5. The key to 55694's longevity is its repeated factorisation into biprimes with one small and one large factor. These are the factorisations:
  • 55694 = 2 * 27847
  • 27849 = 3 * 9283
  • 9286 = 2 * 4643
  • 4645 = 5 * 929
  • 934 = 2 * 467
  • 469 = 7 * 67
  • 74 = 2 * 37
  • 39 = 3 * 13
  • 16 = 2 * 2 * 2 * 2
  • 8 = 2 * 2 * 2
  • 6 = 2 * 3
  • 5 is prime
Here is a permalink to an algorithm that will calculate the trajectory of any number under this recursive process. Figure 1 shows a graph of the trajectory of 55694.

Figure 1

How do things change when we consider only the prime factor without multiplicity? Here are the results:
  • 0:   09.59%
  • 1:   11.81%
  • 2:   14.78%
  • 3:   26.51%
  • 4:   21.27%
  • 5:   11.08%
  • 6:   3.955%
  • 7:   0.899%
  • 8:   0.093%
  • 9:   0.006%
  • 10: 0.000%
  • 11: 0.000%
Because the sum of the prime factors without multiplicity is always equal to or smaller than the sum with multiplicity, the numbers will in general reach 4 or a prime more quickly.

No comments:

Post a Comment