1
$\begingroup$

I'm working on a code challenge that requires finding the total stopping time of a number.

I chose a recursive solution because it was the smallest, but Clojure can't guarantee tail-call optimization unless I use recur. To make sure my code works for numbers up to 5764000000000000000 (apparently the highest number that the conjecture has been proven true for, according to the challenge OP), I need to know what the highest stopping time I can expect is.

I'm trying to test every number, but that's painfully slow. I'm currently at 354000000 and the highest TST I've found is 964. It handles that fine, but I'm only 6.14e-9% of the way there.

The only information I can find stops at numbers around 100 million, which is far short of what I need.

For the range of numbers for which the conjecture has been proven true, what is the highest total stopping time that's been found?

1 Answers 1

2

This is from here:

https://en.wikipedia.org/wiki/Collatz_conjecture

According to this, the conjecture has been checked up to $2^{60} > 10^{18}$ and here are the longest sequences found:

less than 10 is 9, which has 19 steps,

less than 100 is 97, which has 118 steps,

less than 1,000 is 871, which has 178 steps,

less than 10,000 is 6,171, which has 261 steps,

less than 100,000 is 77,031, which has 350 steps,

less than 1 million is 837,799, which has 524 steps,

less than 10 million is 8,400,511, which has 685 steps,

less than 100 million is 63,728,127, which has 949 steps,

less than 1 billion is 670,617,279, which has 986 steps,

less than 10 billion is 9,780,657,631, which has 1132 steps,

and

less than 100 billion is 75,128,138,247, which has 1228 steps.

  • 0
    I don't know how I missed that. Thanks.2017-01-18