Collatz conjecture
Channel: Red Hen dev
Date: 2017-04-15

A simple rendering of the fascinating Collatz conjecture. Interactive version: http://codepen.io/RedHenDev/details/ZegBpR/

Visualized both through virtual 'hailstones' and using a 'turtle'.

The Collatz conjecture states that all positive whole numbers will return to 1, being applied to the following algorithm: if even, then half the number (and put new value through the algorithm again); if odd, then triple the number and add 1 (and put new value through the algorithm again). Continue until value reaches 1.

The intriguing thing is that some numbers spiral and descend across the number line in chaotic, unpredictable fashion, while others quickly bottom out.

A simple but intriguing problem!