Longest known sequence of identical consecutive Collatz sequence lengths?

I've just written a simple java program to print out the length of a Collatz sequence, and found something I find remarkable: Consecutive sequences of identical Collatz sequence lengths. Here is some sample output:

Number: 98 has sequence length 25
Number: 99 has sequence length 25
Number: 100 has sequence length 25
Number: 101 has sequence length 25
Number: 102 has sequence length 25

How is it that these $5$ numbers have the same sequence length? Are the numbers $98-102$ special (note there are several more such sequences, e.g. $290-294!$)? Is $5$ the longest known? If not what is it?


As an aside, here are the sequences for the above numbers (along with helpful stats) as well as the step after it (very long):

Number: 102 has sequence length 25
Number: 51 has sequence length 24
Number: 154 has sequence length 23
Number: 77 has sequence length 22
Number: 232 has sequence length 21
Number: 116 has sequence length 20
Number: 58 has sequence length 19
Number: 29 has sequence length 18
Number: 88 has sequence length 17
Number: 44 has sequence length 16
Number: 22 has sequence length 15
Number: 11 has sequence length 14
Number: 34 has sequence length 13
Number: 17 has sequence length 12
Number: 52 has sequence length 11
Number: 26 has sequence length 10
Number: 13 has sequence length 9
Number: 40 has sequence length 8
Number: 20 has sequence length 7
Number: 10 has sequence length 6
Number: 5 has sequence length 5
Number: 16 has sequence length 4
Number: 8 has sequence length 3
Number: 4 has sequence length 2
Number: 2 has sequence length 1
Number: 1 has sequence length 0
Sequence length: 25. 
Steps calculated: 25. 
Efficiency of: 0.0%
Number: 101 has sequence length 25
Number: 304 has sequence length 24
Number: 152 has sequence length 23
Number: 76 has sequence length 22
Number: 38 has sequence length 21
Number: 19 has sequence length 20
Number: 58 has sequence length 19
Sequence length: 25. 
Steps calculated: 6. 
Efficiency of: 76.0%
Number: 100 has sequence length 25
Number: 50 has sequence length 24
Number: 25 has sequence length 23
Number: 76 has sequence length 22
Sequence length: 25. 
Steps calculated: 3. 
Efficiency of: 88.0%
Number: 99 has sequence length 25
Number: 298 has sequence length 24
Number: 149 has sequence length 23
Number: 448 has sequence length 22
Number: 224 has sequence length 21
Number: 112 has sequence length 20
Number: 56 has sequence length 19
Number: 28 has sequence length 18
Number: 14 has sequence length 17
Number: 7 has sequence length 16
Number: 22 has sequence length 15
Sequence length: 25. 
Steps calculated: 10. 
Efficiency of: 60.0%
Number: 98 has sequence length 25
Number: 49 has sequence length 24
Number: 148 has sequence length 23
Number: 74 has sequence length 22
Number: 37 has sequence length 21
Number: 112 has sequence length 20
Sequence length: 25. 
Steps calculated: 5. 
Efficiency of: 80.0%
Number: 97 has sequence length 118
Number: 292 has sequence length 117
Number: 146 has sequence length 116
Number: 73 has sequence length 115
Number: 220 has sequence length 114
Number: 110 has sequence length 113
Number: 55 has sequence length 112
Number: 166 has sequence length 111
Number: 83 has sequence length 110
Number: 250 has sequence length 109
Number: 125 has sequence length 108
Number: 376 has sequence length 107
Number: 188 has sequence length 106
Number: 94 has sequence length 105
Number: 47 has sequence length 104
Number: 142 has sequence length 103
Number: 71 has sequence length 102
Number: 214 has sequence length 101
Number: 107 has sequence length 100
Number: 322 has sequence length 99
Number: 161 has sequence length 98
Number: 484 has sequence length 97
Number: 242 has sequence length 96
Number: 121 has sequence length 95
Number: 364 has sequence length 94
Number: 182 has sequence length 93
Number: 91 has sequence length 92
Number: 274 has sequence length 91
Number: 137 has sequence length 90
Number: 412 has sequence length 89
Number: 206 has sequence length 88
Number: 103 has sequence length 87
Number: 310 has sequence length 86
Number: 155 has sequence length 85
Number: 466 has sequence length 84
Number: 233 has sequence length 83
Number: 700 has sequence length 82
Number: 350 has sequence length 81
Number: 175 has sequence length 80
Number: 526 has sequence length 79
Number: 263 has sequence length 78
Number: 790 has sequence length 77
Number: 395 has sequence length 76
Number: 1186 has sequence length 75
Number: 593 has sequence length 74
Number: 1780 has sequence length 73
Number: 890 has sequence length 72
Number: 445 has sequence length 71
Number: 1336 has sequence length 70
Number: 668 has sequence length 69
Number: 334 has sequence length 68
Number: 167 has sequence length 67
Number: 502 has sequence length 66
Number: 251 has sequence length 65
Number: 754 has sequence length 64
Number: 377 has sequence length 63
Number: 1132 has sequence length 62
Number: 566 has sequence length 61
Number: 283 has sequence length 60
Number: 850 has sequence length 59
Number: 425 has sequence length 58
Number: 1276 has sequence length 57
Number: 638 has sequence length 56
Number: 319 has sequence length 55
Number: 958 has sequence length 54
Number: 479 has sequence length 53
Number: 1438 has sequence length 52
Number: 719 has sequence length 51
Number: 2158 has sequence length 50
Number: 1079 has sequence length 49
Number: 3238 has sequence length 48
Number: 1619 has sequence length 47
Number: 4858 has sequence length 46
Number: 2429 has sequence length 45
Number: 7288 has sequence length 44
Number: 3644 has sequence length 43
Number: 1822 has sequence length 42
Number: 911 has sequence length 41
Number: 2734 has sequence length 40
Number: 1367 has sequence length 39
Number: 4102 has sequence length 38
Number: 2051 has sequence length 37
Number: 6154 has sequence length 36
Number: 3077 has sequence length 35
Number: 9232 has sequence length 34
Number: 4616 has sequence length 33
Number: 2308 has sequence length 32
Number: 1154 has sequence length 31
Number: 577 has sequence length 30
Number: 1732 has sequence length 29
Number: 866 has sequence length 28
Number: 433 has sequence length 27
Number: 1300 has sequence length 26
Number: 650 has sequence length 25
Number: 325 has sequence length 24
Number: 976 has sequence length 23
Number: 488 has sequence length 22
Number: 244 has sequence length 21
Number: 122 has sequence length 20
Number: 61 has sequence length 19
Number: 184 has sequence length 18
Number: 92 has sequence length 17
Number: 46 has sequence length 16
Number: 23 has sequence length 15
Number: 70 has sequence length 14
Number: 35 has sequence length 13
Number: 106 has sequence length 12
Number: 53 has sequence length 11
Number: 160 has sequence length 10
Number: 80 has sequence length 9
Number: 40 has sequence length 8
Sequence length: 118. 
Steps calculated: 110. 
Efficiency of: 6.779661016949152%

It looks like some numbers act as attractors for the sequence paths, and some numbers 'start' near them in I guess 'collatz space'.


Solution 1:

I have found a sequence of 67,108,863 consecutive numbers that all have the same Collatz length (height). These numbers are in the range $[2^{1812}+1, 2^{1812}+2^{26}-1]$ and I believe it is the longest such sequence known to date. Also I believe that we can obtain arbitrarily long such sequences if we start from numbers of the form $2^n+1$. I would be very interested to see a proof of this though. I have created an OEIS sequence for this: https://oeis.org/A277109

Solution 2:

I found a longer sequence ;)

596310 has sequence length 97
596311 has sequence length 97
596312 has sequence length 97
...
596349 has sequence length 97

That's 40 in a row!

There's nothing special about these numbers, as far as I can see. In fact, there are probably arbitrary long sequences of consecutive numbers with identical Collatz lengths. Here's a heuristic argument:

A number $n$ usually takes on the order of ~$\text{log}(n)$ Collatz steps to reach $1$.

Suppose all of the numbers between $1$ and $n$ have random Collatz lengths between $1$ and ~$\text{log}(n)$. Then, if we choose a starting point at random, the probability that the next $X$ consecutive numbers all have the same Collatz length is ~$\text{log}(n)^X$. There are ~$n$ possible starting points, so we want $X$ so that the probability is $\text{log}(n)^X \cong \frac{1}{n}$. Then I'd expect the longest sequence to have around $X$ consecutive numbers.

As it turns out, $X=\frac{\text{log}(n)}{\text{log}\text{log}(n)}$ does the trick.

TL;DR: between $1$ and $n$, the longest sequence of consecutive numbers with identical Collatz lengths is on the order of $\frac{\text{log}(n)}{\text{log}\text{log}(n)}$ numbers long.