>>14412442I solved it.
Let
g(n) = n/2
h(n) = 3n + 1
For the numbers of g and h applications in each cycle you can get some trivial bounds
#g <= 2 * #h
log(2) * #g > log(3) * #h
and it's also important to note that each application of h is followed by an application of g.
That observation greatly reduces the number of possible cycles.
>1-cycles and 2-cyclesTrivially don't exist
>3-cyclesOnly the gghgghggh.... cycle is a candidate. To check a candidate we simply have to solve
g(g(h(n))) = n
which gives n=1 which is the 1-4-2 cycle.
>4-cycles and 5-cyclesDon't exist because of the bounds.
>6-cyclesHere we check all candidates again
ggghgh -> n=5/7 -> No cycle
gghggh -> n=1 -> 1-4-2-1-4-2 which is the 3-cycle above again.
>7-cyclesDon't exist because of the bounds.
>8-cyclesggghghgh -> n=19/5 -> No cycle
gghgghgh -> n=23/5 -> No cycle
>9-cyclesgggghghgh -> n=19/37 -> No cycle
ggghgghgh -> n=23/37 -> No cycle
ggghghggh -> n=29/37 -> No cycle
gghgghggh -> n=1 -> The 1-4-2 cycle again.
This is how to check for a specific cycle length. The general solution comes next post.