Visualizing the Collatz Conjecture and Some Variants

The Collatz conjecture (also known as the conjecture) claims that any positive integer eventually returns to 1 when iterated through the following recursive formula :

If is even, divide it by 2—that is, . If is odd, multiply it by 3 and add 1—that is, .

This Demonstration shows the different paths of the positive integers up to 1000 as they are run through the Collatz sequence. It also includes other recursive functions with respect to different moduli (3, 5, and 7). These recursive functions return to 1 as well for every value in this range of 1000. Interestingly enough, they appear to return to 1 for values beyond 1000, like the Collatz case. Neither the Collatz conjecture nor any of its variants have been proven.

Click to zoom into the graph and shift-click to zoom back out.