OFFSET
0,2
COMMENTS
This variation of the "3x+1" problem with a class of rational numbers is as follows: start with any number 1/(2n+1). If the numerator is even, divide it by 2, otherwise multiply it by 3 and add 1. Do we always reach the end of a cycle with a rational number? It is conjectured that the answer is yes.
If x is of the form 1/2n, each trajectory is divergent because the numerator is always odd and tends into infinity.
If x is of the form x = m/(2n+1) where m is an integer, it is conjectured that the number of steps tends into the end of a finite cycle.
In this sequence, it appears that the last number of the cycle is 1 when 2n+1 is a power of 3. For example, starting with 1/9, the trajectory is 1/9 -> 4/3 -> 2/3 -> 1/3 -> 2 -> 1 with 5 iterations.
Observations: the last number of each trajectory has three possible forms: 1, 2/(2n+1) or a form m/(2n+1) where m> 2.
LINKS
Michel Lagneau, Table of n, a(n) for n = 0..10000
J. C. Lagarias, The set of rational cycles for the 3x+1 problem, Acta Arith. 56 (1990), 33-53.
EXAMPLE
For n = 3, a(3) = 6 because the corresponding trajectory of 1/7 requires 6 iterations to reach the last term of the cycle:
1/7 -> 10/7 -> 5/7 -> 22/7 -> 11/7 -> 40/7 -> 20/7 and 20/7 is the last term because 20/7 -> 10/7 is already in the trajectory. The rational 10/7 has two antecedents: 1/7 and 20/7 are in the same trajectory (this property is conjecturally impossible in the classical 3x + 1 problem with x integer). The periodic nontrivial loop contains 6 distinct rational numbers (20/7 ->10/7->5/7 ->22/7 -> 11/7 -> 40/7).
MAPLE
with(numtheory): z:={1}:for m from 0 to 80 do: n:=2*m+1:lst:={1/n}:x0:=1: x:=x0*3+n: lst:=lst union {x/n}:for i from 1 to 10000 do: x:=x/2: lst:=lst union {x/n}: if irem(x, 2)=1 then x0:=x:x:=x0*3+n: lst:=lst union {x/n}:else fi:od: n0:=nops(lst):if lst intersect z = {1} then n1:=n0-2: printf(`%d, `, n1): else n1:=n0-1: printf(`%d, `, n1):fi: od:
MATHEMATICA
Collatz[n_] := NestWhileList[If[EvenQ[Numerator[#]], #/2, 3 # + 1] &, n, UnsameQ, All]; Join[{0}, Table[s = Collatz[1/(2 n + 1)]; len = Length[s] - 2; If[s[[-1]] == 2, len = len - 1]; len, {n, 100}]] (* T. D. Noe, Jan 22 2013 *)
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
Michel Lagneau, Jan 22 2013
STATUS
approved