Collatz conjecture (3n+1)

unproven (always 1 so far)

The Collatz process is brutally simple: if n is even, halve it; if odd, triple it and add one. The conjecture — open since 1937 and called "hopeless" by Erdős — says every positive start eventually falls to 1, then loops 1→4→2→1. Despite being checked for every number up to astronomically large bounds, no proof exists. The orbits are wildly irregular: 27 climbs above 9000 and takes 111 steps before collapsing. We just trace the trajectory cell by cell so you can watch it bounce. Even steps shrink it; odd steps spike it upward.

Sequence
Press ▶ to run
Edit the input and press Play

How it works

  1. If n is even, divide by 2.
  2. If n is odd, replace it with 3n + 1.
  3. Append the new value and repeat.
  4. Stop at 1 (so far, always reached).

Pseudocode

1collatz(n):                         # steps unbounded (open)2  while n ≠ 1:3    if n is even:  n ← n / 24    else:          n ← 3·n + 15    emit n