GeekDad Puzzle of the Week – Consecutive Collatz Conjecture Counts

Reading Time: 2 minutes
(xkcd): The Collatz Conjecture states that if you pick a number, and if it's even divide it by two and if it's odd multiply it by three and add one, and you repeat this procedure long enough, eventually your friends will stop calling to see if you want to hang out.
(xkcd): The Collatz Conjecture states that if you pick a number, and if it’s even divide it by two and if it’s odd multiply it by three and add one, and you repeat this procedure long enough, eventually your friends will stop calling to see if you want to hang out.

The Collatz Conjecture has many names. It is also known as the “3n+1 Conjecture,” and the “Syracuse Problem,” and the sequence of numbers it generates are sometimes known as “hailstone numbers.” Basically, if you start with any natural number, you continuously either halve the number (if it is even) or triple it and add one (making it even) until you reach 1.

There are a lot of papers and works out there on the Collatz Conjecture, on topics such as if there are cycles (none found, save for the trivial 1-2-4 cycle), whether or not each and every number will eventually stop, and various patterns in the count of steps necessary to terminate across sets of numbers.

This week’s puzzle deals with the number of steps needed for a set of consecutive numbers to complete. For example, 14 and 15 both take a total of 17 steps to complete their cycle:

1415
746
2223
1170
3435
17106
5253
26160
1380
4040
2020
1010
55
1616
88
44
22
11

The next “run” in consecutive Collatz lengths is a run of 2 at 18; both 18 and 19 take 20 steps to terminate, and the first run of 3 is at 28; the numbers 28, 29, and 30 all take 18 steps to terminate.

This week’s GeekDad Puzzle of the Week is straightforward: for all starting numbers under 107 (ten million), what is the longest run of consecutive numbers that all take the same number of steps to terminate? In the case of ties, please submit the lowest starting value. As always, please send your answers to GeekDad Central by end of day Friday for your chance at this week’s $50 ThinkGeek Gift Certificate.

Good luck, and happy Collatzing!

Get the Official GeekDad Books!