I'm trying to get an insight of the Collatz Conjecture (3n+1 conjecture), and have been researching about iterated functions and thought the conjecture could possibly be solved if I was able to successfully iterate a function that gives me a new element in the progression to infinity and prove that the result tended to 1. I still don't know if this would work since the last thing any number does is fall into a loop of 4, 2, 1 and so on, but that's beyond the question.
My idea is to have a function that does the following:
- $ f(x) = 3x+1 $
- $ g(x) = $ biggest factor of 2 of $ x $
The problem is, how do I find this biggest factor of two? My idea is to do something like the following
$ h(x) = \frac{f(x)}{g(f(x))} $
This, I think would return the next odd number in the progression, so I could then run $ h(x) $ again on the result, thus I would want to iterate $ h(x) $ to infinity.
Example:
Let $ n = 1 $, $f(1) = 4$, thus, $ g(f(1))= 4 $, and so, $ h(1) = 1 $.
However, let's say we start with another number.
Let $ n = 4 $, $f(4) = 13$, this, $g(f(4)) = 1$, and so, $ h(4) = 13 $. I know it's a stupid example, because 4 is already a power of two, so I would arrive at 1 just by dividing by 2 $log_2(4)$ times, but note that $g(13) = 1$ because 1 is the biggest factor of 2 that divides 13.
What am I looking for? How could I express $g(x)$ ?