Skip to content

Instantly share code, notes, and snippets.

@tararoys
Last active July 12, 2017 15:09
Show Gist options
  • Save tararoys/8366141 to your computer and use it in GitHub Desktop.
Save tararoys/8366141 to your computer and use it in GitHub Desktop.
Collatz Conjecture pattern

I have noticed a really interesting pattern in the Collatz conjecture. It looks to me like a fractal. This is a call for help: I want to know which mathematicians have also noticed this pattern and have written about it. I have tried to research this, and I have not found any resources written on a level that an artist like me can understand. In fact, I've found a grand total of two resources, period, besides my notes.

The only two mentions I found of this pattern in the collatz conjecture were in the encyclopedia of integer sequences. Apparently Labos Elemer noticed something similar, as did lambert Klasen. I have not been able to find any other references to it, mostly because I don't speak High Mathematicalese.

First, let me tell you the pattern.

Start with the number one.

1

The next number is two.

1, 2

Repeats everything that came before the two.

1, 2, 1

the next number is three.

 1, 2, 1, 3

repeat everything that came before the three.

 1, 2,  1, 3, 1, 2, 1

the next number is four.

 1, 2, 1, 3, 1, 2, 1, 4

repeat everything that came in before the four.

 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1

In short, every time you add the next integer to the sequence, you have two repeats all of the previous numbers in the sequence.

This pattern appears like a fractal to me. It seems like the larger pieces are built from copies of the smaller pieces. It is not precisely in infinite fractal, because it uses the integers, however it does play similar behavior on all scales.

This pattern shows up everywhere in the Collatz conjecture.

Let me give a brief review of the Collatz conjecture. I prefer to work with a slightly modified the last conjecture, which is as follows.

if a number is even, divided by two. If a number is odd, multiply its by three, add one, and divide it by two.

The conjecture is that if you keep repeating this process, eventually you will reach the number one. The weird thing about the conjecture is that as yet no one has been able to prove why this happens.

The pattern I described above shows up everywhere I look in the collatz conjecture. Allow me to demonstrate.

Let us take every single even number. If I want to be more precise, I will say I am taking every single positive even integer. All of these numbers are going to be divided by two. Dividing these numbers by two results in some odd numbers and some even numbers. I am going to continue to divide these numbers until I am left with only odd numbers. How many divisions by 2 does it take for each even number to "fall" into an odd number? Let us see:

 Even numbers:   2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30,
 n/2 steps     : 1, 2, 1, 3,  1,  2,  1,  4,  1,  2,  1,  3,  1,  2,  1,

And there is the pattern.

Let us see where else it shows up. Let us take every single on number. If I want to be more precise, I will say I am taking every single positive odd integer. All of these numbers are going to be multiplied by three, added to one, and divided by two. Doing this results in some odd numbers and some even numbers. I am going to continue to do this until I am left with only even numbers. How many of these steps does it take for each odd number to "rise" into an even number?

odd numbers:    1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21,  23, 25, 27, 29,
(3n+1)/2 steps: 1, 2, 1, 3, 1,  2,  1,  4,  1,  2,  1,   3,  1,  2,  1,

And there is the pattern again.

Where does this pattern show up in the collatz conjecture? Let us take this sequence of odd numbers 4 % 3. This is the collection of all on numbers that take two steps to rise into an even number. Let us do those two steps and raise them to their even numbers. Then let is see how many steps it takes for those even numbers to fall into an odd number again.

4 % 3 numbers:        3, 11, 19,  27,  35,  43,  51,  59,  67,
(3n+1)/2 twice:       8, 26, 44,  62,  80,  98, 116, 134, 152,
2 as a prime factor:  3,  1,  2,   1,  4,    1,   2,   1,   3

Using this pattern, I was able to guess several numbers that had unusually long hailstone sequeneces. I am very interested in looking around the collatz conjecture some more and find where else this pattern is repeated. I am also very interested in anybody who knows more about this pattern.

@BOWTester2016AcntMur
Copy link

The "1,2,1,3,1,2,1,4,..." pattern is actually a consequence created by the even numbers themselves. This pattern turns up in Collatz Conjecture since dividing by 2 is essential to the structure of the Conjecture tree and its sequences.

This pattern is embedded in the original counting numbers. When you divide every number n by 2 until it is odd in the natural counting sequence 1,2,3,4,5,6,7,8,9... it becomes 0,1,0,2,0,1,0,3,0... If you ignore the 0s or all odd numbers, the pattern emerges. This pattern nicely reflects the number of 2s in the sequence's factorization: 1,2,3,4,5,6,7,8,9... is _, 2, 3, 2x2, 5, 2x3, 7, 2x2x2, 3x3, ...

When looking at the Collatz Conjecture, the position of the numbers change depending on what pattern you are looking for, but the original pattern still holds. For example, the second pattern you mentioned ignores numbers such as 8 and 12 and creates this pattern when looking at the even numbers: 4,10,16, 22, 28, 34, 40, ... --> 2,1, 4,1, 2,1, 3, ...

Since the Conjecture never changes the original properties of factorization, this pattern will crop up as long as you are concerned with dividing by 2. If you divided by 3 instead for example, you would get a similar pattern with the multiples of 3. Unfortunately for trying to understand the Conjecture, this sequence sometimes acts as a pest when trying to have a deeper understanding of how the odd rule impacts the Collatz Conjecture and understanding why 3x+1 has the "magical" property of converging to 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment