Update/warning: The explaination below contains some obvious errors. These errors have been worked on and turned this research into: Generating (almost?) all odd numbers for the 3n + 1 problem
Most here are probably aware of the Collatz Conjecture. It is conjectured that every number eventually ends in a trivial cycle of 1 -> 4 -> 2 -> 1 if you follow these rules:
Take any number:
- If it is odd, multiply by three and add one
- If it is even, divide by two
- Repeat.
First of all, a disclaimer: I'm not a mathematician, I'm a computer programmer that likes math (a lot) and it trying to learn more. Maybe the thing I'm doing here is very wrong or trivial, just tell me. This is what I want to find out/learn... I hope some of you will follow along and teach me new things.
Smallest number in the cycle
If a second cycle in the Collatz Conjecture exists, it must have a smallest number in the cycle. This number has some interesting properties (if it exists).
Lets call the smallest number of the cycle Y.
First of all:
Y % 2 = 1
Y can't be even because that would divide by two creating a smaller number.
This leaves Y to be either:
Y = 6*n + 1
Y = 6*n + 3
Y = 6*n + 5
Preceding numbers
Let's look at the numbers preceding Y:
Y = 6*n + 3
is impossible. The number before this step in the cycle must be Y * 2
. Thus X = Y * 2 = 6 * ((n * 2) + 1)
, X%6=0
. There is no odd number that can form such a number X%6=0
because (odd * 3) + 1
is always X%6=4
. So this number can't be part of a cycle.
Y = 6*n + 5
is also impossible. The number before this step in the cycle must be Y * 2
. Thus X = Y * 2 = 6 * ((n*2) + 1) + 4
. This number is X%6=4
, but there is an odd number W that comes before X in the cycle:
W = ((X)-1)/3
W = ((6 * ((n*2) + 1) + 4)-1)/3
W = 4*n + 3
And we know:
Y = 6*n + 5
As you can see W < Y
. Thus Y isn't the lowest number in the cycle, preceding number W is smaller. Y in this form can't be the lowest point of a cycle.
This leaves Y = 6*n + 1
as only option.
Looking forward
Next we can look at the numbers after Y:
Because Y has the form 6*n + 1
we know something about the next two numbers in the sequence.
Y = 6*n + 1
Z = Y*3+1 = 18*n + 4
A = Z / 2 = 9*n + 2
Next I want to split Y into two groups, with n being even and n being odd:
Y = 12*i + 1
A = 18*i + 2
And:
Y = 6 + 12*j + 1
A = 9 + 18*j + 2
The first form 12*i + 1
can be proven to be false, except for i=0 (the trivial known cycle 1>4>2>1)
When i = 0:
Y = 1
A = 2
Now A is even and there is a successor B, which is A/2:
B = A/2 = 2/2 = 1. This is equal to Y and can make the trivial loop. But this breaks Y > 1.
When i > 0:
Y = 12*i + 1
A = 18*i + 2
B = 9*i + 1
Given i>0 the resulting B is smaller than Y, thus Y isn't the lowest number, resulting number B is smaller.
So this leaves Y = 6 + 12*j + 1
as the only possible form for a smallest number in an hypothetical second cycle?
This eliminates 91.6% of the numbers, maybe there is a trick to eliminate the remaining 8.4%? Or am I doing something very weird here, making mistakes etc?