Sunday, 8 February 2026

The Revision Revisited

In my post titled A Revision, I outlined an alternative algorithm for building a sequence based on the factors of numbers considered with multiplicity. This is the algorithm:

Suppose we take any positive integer \(n \gt 1\) and apply the following rules to it:
  • if a \(4k+1\) prime, double it and add 1: \(n \rightarrow 2n+1\)
  • if a \(4k+3\) prime, subtract 1 and divide by 2: \(n \rightarrow (n-1)/2\)
  • if composite, determine its number of factors \(f\) counted \( \textbf{with multiplicity}\)
    • if \( n \pmod f \equiv 0\) then \(n \rightarrow \dfrac{n}{f} \)
    • if \( n \pmod f \not\equiv 0 \) then \(n \rightarrow n \times f\)
Keep repeating this process until a loop is reached or call a stop after a fixed number of iterations. 

What I'm interested in looking at in this post are the record lengths of sequences generated over a range of numbers, noting as well the highest and lowest values that are reached by sequence members. Figure 1 shows the results in the range from one to one million (permalink):


Figure 1

Let's now consider the algorithm where multiplicity is ignored. This algorithm in as follows:

Suppose we take any positive integer \(n \gt 1\) and apply the following rules to it:
  • if a \(4k+1\) prime, double it and add 1: \(n \rightarrow 2n+1\)
  • if a \(4k+3\) prime, subtract 1 and divide by 2: \(n \rightarrow (n-1)/2\)
  • if composite, determine its number of factors \(f\) counted \( \textbf{without multiplicity}\)
    • if \( n \pmod f \equiv 0\) then \(n \rightarrow \dfrac{n}{f} \)
    • if \( n \pmod f \not\equiv 0 \) then \(n \rightarrow n \times f\)
Keep repeating this process until a loop is reached or call a stop after a fixed number of iterations. 

Figure 2 shows the record lengths, highs and lows for the range from one to one million (permalink).


Figure 2

It can be noted that the record lengths of sequences are shorter when multiplicity is ignored and more end in 1 rather than a loop.

No comments:

Post a Comment