Visualizing the Collatz Conjecture and Some Variants

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

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.


Contributed by: Alex Han (July 2015)
(Mathematica Summer Camp 2015)
Open content licensed under CC BY-NC-SA



Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.