The Collatz Conjecture

The Collatz Conjecture is a simple statement that is hard to prove. Given the funtion

f(x) = 3x+1 if x is odd, otherwise x/2

and the sequence generator

S(m) : a0 = m, an = f(an-1)

For any positive integer m, does there exist a positive integer n such that an = 1?

Here are some generated sequences as examples.

graphing the length of each generated sequence gives a chaotic graph.
If you continue these expansions you may notice a few things. To solve the repetition problem let -> be defined as follows. a -> b iff b is an element in S(a). So if b shows up after a then a -> b. -> is transitive so it lets us skip known subsequences. -> helps abstract away the number of iterations and focuses on if a number reaches a known 1 terminating sequence. The following example shows strips away even numbers using ->. This reasoning behind this will be explained in the next section Graphing the length of each sequence excluding even numbers gives a familiar graph
When compared to the earlier graph that includes even numbers the shapes are nearly identical
graphing the ratio between the graphs shows an average ratio around 3 with spikes around powers of 2

Prime Factors, and Simple 2s

When first tackling the problem, abstracting away the 2s is usually the first step. Since even numbers are divided by 2 until they are odd, they strip away all the 2s from a numbers prime factorization. For example, look at the collatz sequences of numbers broken into their prime factors

Notice all the powers of two vanish and leave 3. In general x*2n -> x. This means x*2n forms an equivilance class that all collapse to n. In effect this means we ignore powers of 2, and we can now focus only on odd numbers. Lets look at the collatz sequences focusing on prime factorizations ignoring powers of 2. The pattern in prime factorizations is hard to follow, so we need a change in perspective.

Binary Representation

Binary represents the problem well in a couple of ways. We will use the term binary string to mean the binary representation of a number. s will be used to a group of digits of variable length and values. exponentiation of a binary string will be interpeted as repetition of those digits.

Lets look at some examples. Here are som general rules for simplifying binary strings This may look unorganized, but the inverses have patterns. The following is an example. note that multiples of 3 are skipped because they have no inverses. It may be hard to see but the inverses are ordered in a binary fractal.

Binary Fractal, and the Binary Lookup

To explain the idea of the binary fractal, look at the pattern in the number of factors of 2 in the natural numbers.