# The Collatz Conjecture

This Conjecture is probably one of the easiest to understand which hasn’t yet been proven in the history of mathematics. The beauty of this one is that a student in the last forms of primary school might very well be able to do the calculations while, thus far, not even the greatest mathematical minds have been able to prove if and why the Collatz Conjecture is true or not. The great, late Hungarian mathematician Paul Erdős has been quoted as saying: ‘Mathematics may not be ready for such problems.’

## The rules

There is some controversy over whether the prolific German mathematician Lothar Collatz was actually the first to come up with the idea in 1937, two years after his receiving his doctorate. It is also known as the ‘3n + 1 problem’, the Ulam conjecture, Kakutani’s Problem, the Thwaites Conjecture, Hasse’s Algorithm or the Syracuse Problem. If you were under the impression most of these refer to other, actual people then you are correct.

As the rules of the Conjecture are so simple, it is likely many people have had the same idea independently of one another.

Here are the rules:

1. Take any positive, whole number – a positive integer, as it’s called.
2. Do either of the following:
• if the number is even, divide by 2;
• if the number is odd, multiply by 3, add 1.
3. Take the result and do either of the following:
• if the result is 1, stop;
• if the result is not 1, go back and do step 2 again but this time using the result to do either of the two operations, and so on.

The Collatz Conjecture goes as follows: no matter which positive integer you start from, irrespective of the number of steps, you will always get 1 as final outcome.

(Note that if you would continue to do the steps with 1, you would simply cycle back to 1 in just three steps until the end of times. I mean, that’s just boring and silly. So, stop at 1.)

## Example

10 is even; divided by 2 equals 5.
5 is uneven; multiplied by 3 plus 1 equals 16.
16 is even; divided by 2 equals 8.
8 is even; divided by 2 equals 4.
4 is even; divided by 2 equals 2.
2 is even; divided by 2 equals 1. We’re there!

This took us 6 steps. You can try a few numbers yourself if you’d like. Well, that is, have your computer, mobile phone or tablet do the boring work, which you can do here.

## Visualisation

As you probably saw via the link above, we can also visualise the steps produced by the Collatz algorithm. We will quickly show a few alternatives before moving on to the most famous one, the Edmund Harriss visualisation (for which we wrote a JavaScript applet, yay!).

Suppose, we would plot the progression of the results of our example. We started with 10. As you can see, the values fluctuate a bit before descending to 1:

Have a look at the next one. We started at 8000. The numerical progression is then 8000 → 4000 → 2000 → 1000 → 500 → 250 → 125 → 376 → 188 → 94 → 47 → 142 → 71 → 214 → 107 → 322 → 161 → 484 → 242 → 121 → 364 → 182 → 91 → 274 → 137 → 412 → 206 → 103 → 310 → 155 → 466 → 233 → 700 → 350 → 175 → 526 → 263 → 790 → 395 → 1186 → 593 → 1780 → 890 → 445 → 1336 → 668 → 334 → 167 → 502 → 251 → 754 → 377 → 1132 → 566 → 283 → 850 → 425 → 1276 → 638 → 319 → 958 → 479 → 1438 → 719 → 2158 → 1079 → 3238 → 1619 → 4858 → 2429 → 7288 → 3644 → 1822 → 911 → 2734 → 1367 → 4102 → 2051 → 6154 → 3077 → 9232 → 4616 → 2308 → 1154 → 577 → 1732 → 866 → 433 → 1300 → 650 → 325 → 976 → 488 → 244 → 122 → 61 → 184 → 92 → 46 → 23 → 70 → 35 → 106 → 53 → 160 → 80 → 40 → 20 → 10 → 5 → 16 → 8 → 4 → 2 → 1.

That’s a whole lot of numbers before the algorithm leads to 1. Hundred and fourteen steps, to be precise. This is what it looks like:

As you can see, the whole plot fluctuates quite a bit. It’s a bit of a mess, really. There’s no distinct pattern other than it eventually converging to 1. As the values may become quite large very quickly, let’s plot the same graph in a semi-log grid. The y-axis is logarithmic, the x-axis remains linear.

Just to humour ourselves, let’s reverse the step order, so that the plot is mirrored and converges to the value 1 in the bottom-left corner:

As we’re not sure how many steps it might take before a sequence of numbers ends with 1, let’s also change the x-axis to a log scale. We get this:

With this one, we can probably visualise a whole bunch of sequences! Lastly, let’s now plot a series of sequences! That is, firstly, we let our JavaScript applet calculate the sequence starting at 10000. Then we let it calculate the sequence starting at 9999. And so on, downwards, until it reaches 4. And then have it all plotted, all at once! To prevent it from becoming too dense, as several sequences will overlap each other, we add a little transparency to each plot. If the same ‘path’ has been taken, that path will appear ‘darker’. This is the result:

This almost becomes some form of art. If you would frame this plot, without the titles, axes, and scales – just the plot – you could have a piece of geometrical art bearing the title ‘The Collatz Conjecture’ or something like that. I might do that, actually.

With this applet you can generate your own ‘art’ like the one above.

## The Edmund Harriss visualisation

Edmund Harriss, a mathematician working at the University of Arkansas, came up with a beautiful visualisation of progressions of Collatz sequences, which was featured on the mathematical YouTube channel Numberphile. We highly recommend following their channel.
{"ft_lang_label":"__label__en","ft_lang_prob":0.9168137,"math_prob":0.9491946,"size":6550,"snap":"2023-40-2023-50","text_gpt3_token_len":1770,"char_repetition_ratio":0.09532539,"word_repetition_ratio":0.018867925,"special_character_ratio":0.31557253,"punctuation_ratio":0.122023806,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98131764,"pos_list":[0,1,2],"im_url_duplicate_count":[null,2,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-11-30T14:52:50Z\",\"WARC-Record-ID\":\"<urn:uuid:4d00198d-e094-4269-b9b1-9a55167ffac5>\",\"Content-Length\":\"114439\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:34aaf6b4-61e2-4ae3-abf8-55a50fb98a3c>\",\"WARC-Concurrent-To\":\"<urn:uuid:d3c24fc0-3d6b-49ba-8ed1-4045b37f6226>\",\"WARC-IP-Address\":\"185.104.29.236\",\"WARC-Target-URI\":\"https://opencurve.info/the-collatz-conjecture/\",\"WARC-Payload-Digest\":\"sha1:5PU3XIINKLQ2FOD64VCTMQJNWTWSUBMP\",\"WARC-Block-Digest\":\"sha1:SQQC56TH2RSW5DJUESTJWPHL3EFLU3BA\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-50/CC-MAIN-2023-50_segments_1700679100227.61_warc_CC-MAIN-20231130130218-20231130160218-00351.warc.gz\"}"}