Collatz Conjecture Visualizer
For any positive integer n, the Collatz (3n+1 / hailstone) sequence is generated by the rule: if n is even, divide by 2; if odd, compute 3n+1. Repeat until you reach 1. The Collatz conjecture asserts that every positive starting value eventually reaches 1 — unproven for all n. This tool shows the full sequence, the number of steps to reach 1, the peak value reached, and the parity pattern. All arithmetic uses exact big integers, so even the famously long sequences (e.g. n = 27, 111 steps) are exact. Runs locally in your browser.
Input
Summary
Hailstone sequence
The rule: n → n/2 when n is even, n → 3n+1 when n is odd. The stopping time is the number of steps to first reach 1 (n = 1 has stopping time 0). The peak (maximum excursion) is the largest value the sequence attains. Sequences are named "hailstone" because values rise and fall before — conjecturally — falling to 1. n = 27 is the classic example: 111 steps, peaking at 9232. Every value verified here does reach 1; the conjecture itself remains unproven for all integers. Pairs with the Fibonacci Sequence, Prime Factorization, and Euler Totient tools. Everything runs locally — nothing leaves your browser.