Finding cycles of generalized 3x+1 functions

We consider functions T:ℤ→ℤ with d (> 1) branches, defined in terms of d non-zero integers m0,...,md-1 and d integers x0,...,xd-1.

Then T(x) = ⌊mix ⁄ d⌋ + xi, if x ≡ i (mod d).

We search all trajectories x, T(x), T2(x),... where |x| ≤ R ⁄ 2 = 60000 ⁄ 2 for cycling by Floyd's method of testing for equality of nth and 2nth iterates for n ≤ U = 1000000.
If |Tn(x)| > J = 1012, we suspect this trajectory to be divergent.

Caution: Because of the limitations of BCMATH on large array sizes, J will be too small for some mappings T.
For example, the 3-branched mapping T(x):= x ⁄ 3 if x ≡ 0 (mod 3), ⌊2x ⁄ 3⌋ if x ≡ 1 (mod 3), ⌊13x ⁄ 3⌋ if x ≡ 2 (mod 3), the trajectory {Tn(47)} is declared divergent, which it is not.

Example. The 3x+1 mapping T(x)=x ⁄ 2 if x is even, (3x+1) ⁄ 2 if x is odd, corresponds to m0=1, m1=3, x0=0, x1=1. There appear to be 5 cycles, starting points 1, 0, -1, -5, -17.

Conjectures

Suppose gcd(mi, d) = 1 for 0 ≤ i &le d-1. (The relatively-prime case.)
  1. There will be only finitely many (≥ 1) cycles.
  2. If ∏0≤i≤d-1 |mi| < dd, then all trajectories will eventually become periodic.
  3. If ∏0≤i≤d-1 |mi| > dd, then most trajectories will be divergent.

Enter d (1 < d ≤ 10):
Enter the d non-zero integers mi (separated by spaces):
Enter the d integers xi (separated by spaces):
print complete cycle and cycle-length
print start of cycle and cycle-length

Last modified 26th June 2006
Return to main page