Exploring the Collatz Conjecture through Binary Tree Structures

Disclaimer: I am not a mathematician, and I am not claiming that any of the following represents any proof of the Collatz Conjecture. These are simply observations based on algebraic modeling and visualization of the path logic. I just enjoy the problem and I am interested in looking at interesting ways to visualize the problem.

1. The Geometry of the Path

Every number N in the Collatz sequence follows a unique trajectory that can be mapped onto an infinite binary tree.

A Right Turn represents an “Odd” step: N →(3N + 1)/2

A Left Turn represents an “Even” step: N →N/2

When we follow a specific path of n odd steps and m total steps, we aren’t just performing arithmetic; we are traversing a specific branch of this tree. This traversal generates a “Path Equation” that links the starting value N to the terminal value M:

(3^nN + f)/2^m=M

2. How the Tree Generates the Constant f

​The constant f is the most fascinating part of this equation. It is not a static number but a “path memory” generated by the sequence of turns.

​If we define the path as a bit-string where 1 is an odd step and 0 is an even step, f is built iteratively. Starting at f = 0 and m = 0:

​If the next step is Even (0): m increases by 1. f remains unchanged.

​If the next step is Odd (1): f becomes 3f + 2^m. Then n increases by 1 and m increases by 1.

​This means f is a weighted sum of powers of 2, where the weights are determined by the powers of 3 remaining in the path. The f variable is a sum of 3^x2^k terms

3. Worked Examples of the Summation

​Here is how the tree architecture “builds” f for specific starting values to reach the terminal cycle (M = 1)

​Example: N = 3

f(3) = 3^12^0 + 3^02^1 = 5$

Example N = 5

f(5) = 3^02^0 = 1

Example N = 7

f(7) = 3^42^0 + 3^32^1 + 3^22^2 + 3^12^4 + 3^02^7 = 347

4. Tree-Based Constraints on n, m, and f

The termination condition for the path equation is when M = 1. If we set M to 1 and the solve for N:

(2^m - f)/3^n = N

​The structure of the binary tree places rigid constraints on which values are mathematically “allowed.” For any path to be valid for an integer N, the tree branch must satisfy the modular requirement: 2^m -f must be divisible by 3^n.

An additional constraint on n is that for any path length m (m tiers down the tree) the maximum value n can have is m. This represents 100 percent odd steps. The value n can take on is 0,…,m.

  1. Loop equation and constraints.

The path equation helps determine the conditions under which we might find loops. If the final value (M) is set to (N). We star and stop our path with the same number.

3^nN + f = 2^mN

f=2^mN-3^nN

f/(2^m-3^n)=N

Another constraint is based on the following:

2^m ≡ f (mod 3^n)

Substituting the definition of f from the Cycle Formula $f = N(2^m-3^n), into the modular constraint:

2^m ≡ N(2^m-3^n) (mod 3^n)

Since , this simplifies to:

2^m ≡ 2^mN (mod 3^n)

2^mN-2^m ≡ 0 (mod3^n)

Factoring out 2^m:

2^m(N - 1) ≡ 0 (mod 3^n)

Since and are coprime . we can divide by 2^m:

N - 1 ≡ 0 (mod 3^n)

Conclusion for Non-Trivial Cycles:

​Any number N that participates in a non-trivial cycle (where n>0) must satisfy the condition:

N ≡ 1 (mod 3^n)

This means N must be of the form N = 3^n k + 1 for some integer k.

From where did you get 2^m ≡ f (mod 3^n) in your last post? the case where 1 was reached?

Sorry, I shouldn’t have glossed over that detail. From the requirement that 2^m-f be divisible by 3^m . Therefore:

2^m-f ≡ 0 (mod 3^n)

2^m ≡ f (mod 3^n)

Hmm. I think I might have made a mistake.

2^m-f ≡ 0 (mod 3^n)

That assumes the path N takes reaches 1. Which happens if N is 1. But not necessarily for every N. It would be true in general that:

2^mM-f ≡ 0 (mod 3^n)

But, I am thinking the idea of a general requirement for loops might be wrong.

If you found any of this interesting or amusing check out my web page for more. Its still a work in progress.

Check out Collatz Explorer

( The Collatz Conjecture: An Unsolved Mystery 1)

1 Like

One exciting thing about the binary structure is that every path down to row m can be represented by a string of 1s and 0s for odd and even steps. For each row there are 2^m possible paths, just like an m bit binary number has 2^m permutations. The exciting part is that any m-bit binary number can be converted to a corresponding part equation with a simple algorithm.

Example: 1100

n equals the number of ones. The number of bits is the value of m. In this example n=2, and m=4.

For f we start from f=0, and m and n equal 0.

For an even step (0) we add one to m, but f and n remain the same.

For an odd step (1) we add one to n and m. For f we multiply the current f by 3 then we add up all the odd and even steps before the current odd step. We will call that number k. We add 2^k to the new f value.

f(new)=3Ă—f(old)+2^k

Where k equals the number of even and odd steps before the current odd step.

Working out the current example:

3(0)+2(0)=1 (odd step)

3(1)+2^1=5 (odd step)

3(1)+2^1=5 (even step)

3(1)+2^1=5 (even step)

Final value f = 5.

The path equation is therefore:

((3^2)N+5)/(2^4)=M

This process doesn’t tell us what N and M need to be to satisfy the equation. At this point the path equation is a diaphantine equation to be solved for M and N. However if M = 1 is a possible solution only one value of N will make the equation true.

What about path with repeating patterns? Like: 100100100…

Well we can work out f to establish a pattern.

In this case we get 1,11,97,803,…

See if there is a pattern or do like i do and check the online encyclopedia of integer sequences to see if you find a match.

In this case I did find one that seems to fit:

f = ((8^(n+1))-(3^(n+1)))/5

So we end up with a path equation:

M=(5(3^n)N + (8^(n+1)-3^(n+1))/5(2(8^n)))

If you set M = N and solve for N. You get:

N=(8^(n+1)-3^(n+1))/(5(5Ă—8^n-3^n))

Which should tell us if there is a loop for any integer value of N. In this case the answer seems to be no.

Nice! Probably (100)* doesn’t have enough 1s to “stay above water” and end up where it started (cycle). How about (110)*? Maybe with a few zeroes at the end to close the gap?

We could look at every possible path backwards because that is a tree just in the other direction.

Starting from 6n+4, go up (x2) and down-1/3.

From 2n+1 go up because it’s odd and next is 4n+2 which is even so go up and down. To go down like this just keep a note on that path that n=3n’+2 and then go to 4n’+3 because that path will only work if n is 3n’+2. This is because if n=3n’+2 then 4n+2=12n’+10, and from there you can-1 /3.There are notes for 0,1, and 2 after 3n’. If an even number like 6n+4 is 4 mod 6, just (x-1)/3 for the down step

It isn’t perfectly a binary tree but it’s a useful binary-like tree

I made this to visualize it

https://c6432c18-6aaf-4aae-91d4-4fc8d08b19c4-00-3tsiobhnup3yi.kirk.replit.dev