r/Collatz • • Feb 19 '25

Distribution of Collatz Sequence Lengths for 64-bit Unsigned Integer Start Values

Post image
25 Upvotes

7 comments sorted by

3

u/Gilgamesch61 Feb 19 '25

I was interested in the distribution of collatz sequence lengths with start values in the range of an unsigned 64 bit integer.
Since I couldn’t find a table or diagram, I decided to generate one myself.
The diagram shows the frequency of different sequence lengths observed in a sample of 3.009 billion random starting values.
Additional details and explanations are included in the image.

2

u/raresaturn Feb 20 '25 edited Feb 20 '25

When you get up to really huge numbers, the sequence lengths bounce between two values… therefore many starting numbers have the same sequence length

1

u/Gilgamesch61 Feb 20 '25

I think it can be described as follows:
For every number range of start values n to n2, there is a lower bound for the sequence length (for example if a 2^n start value is in this range) and an upper bound we can only estimate but not determine precisely (otherwise, the Collatz problem would already be solved).
And because of the properties of the collatz sequence, some sequence lengths in this range are more likely than others, with a steep (but different) drop on both sides.

1

u/io_function Feb 20 '25

I’ve been playing around with the distribution of stopping times as well. It seems to follow a perfect log normal distribution (the top plot). I wonder if there is a way to prove the distribution, and the zero probability of an infinitely long stopping time?

1

u/Dizzy-Imagination565 Feb 20 '25

I think it does just boil down to the multiples of powers of 2 being randomly distributed across the pathways die to the chaotic nature of the 3n+1 steps, of course the sad thing is that still doesn't preclude the possibility of an infinitely long pathm

1

u/HappyPotato2 Feb 21 '25

Whoa, the patterns in the top graph are really cool.  It's hard for me to zoom in on my phone, but on the left side, it looks like every 5th value forms a curve.  And after 13 values on that curve, it jumps to a higher curve.  I was wondering if you could highlight them by making every 5th value the same color.  I also counted curves in the middle that occur every 13th value and 18th value.