3n+1 Visualizer
The Collatz Conjecture
Pick any positive integer. If it's even, divide by 2. If it's odd, multiply by 3 and add 1. Repeat. The conjecture says every number eventually reaches 1, but nobody has ever proven it. Mathematicians have tested it for every number up to 2^68 and it always works, yet no proof exists.
n is even: n / 2 n is odd: 3n + 1
Enter a number and watch its journey, or grow the tree backwards from 1 to see how all numbers connect.
How it works
Grow Tree expands backwards from 1 using predecessors (2n, and (n-1)/3 if valid). Thread Mode goes forward: it starts at 2, runs the Collatz sequence until it hits an existing node on the tree, adds the whole path as a thread, then moves to 3, 4, 5, and so on. Each thread is a number's journey to 1. Scroll to zoom, drag to pan.
Nodes: 1 Depth: 0