Background
Variant "3n + 1 problem"
Consider a mapping similar to the original "3n + 1 problem" (Collatz conjecture):
- $n → n/2 + 3$ for even n (variant rule due to +3)
- $n → 3n + 1$ for odd n
Python Code
from collections import deque
def hailstone_cycle(n):
sequence = []
while n not in sequence:
sequence.append(n)
n = 3*n + 1 if n & 1 else n//2 + 3
cycle_start_index = sequence.index(n)
cycle = deque(sequence[cycle_start_index:])
index_of_min = cycle.index(min(cycle))
cycle.rotate(-index_of_min)
return {cycle[0]: list(cycle)}
print(hailstone_cycle(27))
Where the code has extra complexity to deal with different types of cycles.
Cycles
The standard "3n + 1 problem" has 4 known non-trivial cycles:
- A trivial cycle at $0$
- A 3-cycle including $+1$
- A 2-cycle including $-2$
- A 5-cycle including $-20$
- A 18-cycle including $−272$
This variant "3n + 1 problem" has 13 known non-trivial cycles
- A trivial cycle at $+6$
- A 39-cycle including $+137$
- Seven 13-cycles including $+217,+233,+257,+265,+289,+293,+325$
- A 3-cycle including $+19$
- Two 5-cycles including $+7,-254$
- A 2-cycle including $-20$
- A 18-cycle including $-3530$
Observations
Up until this point, nothing would have stood out as particularly unusual to me, except perhaps the seven 13-cycles. But I noticed a connection to another question that relates to Heegner numbers and the Ulam spiral. While these are qualitative observations, I think many would find them unusual:
- $(n^2+n−4^2)/2$ for $1≤n≤6$ produces $−7,−5,−2,2,7,13$, which resembles the "Seven 13-cycles" and "Two 5-cycles" above.
- The sum of the lengths of the non-trivial cycles adds to $2+3+5*2+13*7+18+39=163$ (the largest Heegner number).
- The lengths and frequencies of the cycles uses only $2,3,5,7,13$ as prime factors (all divisors of 12, plus 1).
An interesting property of this mapping is that values congruent to 6 mod 13 are stable:
- $(13*h+6)/2+3=13*(h/2)+6$
- $(13*t+6)*3+1=(13*3)t+19=13*(3t+1)+6$
This led me to the following observation in the original "3n + 1 problem"
- $(13*r+6)/2=13*(r/2)+3=13*(r/2+3)-36$
This led me to wonder if there's a mathematical subject that deals with nested/recursive subspaces that could try to combine the original and variant "3n + 1 problem" to simultaneously use both equations:
- $(13*h+6)/2+3=13*(h/2)+6$
- $(13*r+6)/2=13*(r/2+3)-36$
Question
- What concepts in number theory can be used to represent infinitely nested subspaces? (The phrase "Turtles all the way down" comes to mind.)
- Are there any concepts that can combine two similar classes of transformation/mapping problems into one?
My Python code looks like:
Notably, this variant has 3 types of cycles:
Is it useful? I'm not sure yet.