Wednesday 28 October 2020

Phi - Sigma Loops

Yesterday I turned 26140 days old and one of this number's properties is that it is a member of OEIS A095953:


A095953



Initial values for f(x) = phi(sigma(x)) such that iteration of f ends in a cycle of length 3.


In the case of 26140 we get:
  • \( \phi(\sigma_1(26140))=15552 \)
  • \( \phi(\sigma_1(15552))=18144 \)
  • \( \phi(\sigma_1(18144))=15840 \)
  • \( \phi(\sigma_1(15840))=15552 \)
Thus there is a cycle of length 3. 

This got me thinking about what other cycles exist. What I found was that cycles of 1, 2, 3, 4 and 6 are possible but not cycles of 5 or cycles greater than 6. Between 1 and 26200, the percentages for the cycles of 6, 4, 3, 2 and 1 are about 5.5%, 3.4%, 6.2%, 15.3% and 69.6% respectively (for a total of 100%). Clearly, a cycle of 1 is by far the most common. See Figure 1.

Figure 1

This is not to say that other cycles are not possible but the percentages shown in Figure 1 hold true for the first 26200 numbers. The following SageMath algorithm (permalink) will determine those numbers with a cycle of 3 within a given range. The range and cycle size are easily modified:

L,cycle=[],3
for n in [26100..26200]:
    count,number,M = 0,n,[n]
    for i in [1..7]:
        number=euler_phi(sigma(number))
        if number in M:
            break
        M.append(number)
    for i in range(len(M)):
        if M[i]==number:
            count=len(M)-i
    if count==cycle:
        L.append(n)
print(L)

[26118, 26120, 26140, 26166]

No comments:

Post a Comment