How this calculation works
Trace the Collatz iteration and count steps to 1.
Even n→n/2, odd n→3n+1A worked example
13 goes to 40, 20, 10, 5, 16, 8, 4, 2 and 1.
Good to know
The search stops at 10,000 steps.
Reference: NIST DLMF, Functions of Number Theory (opens in a new tab) ↗
Read the result
Trace the Collatz iteration and count steps to 1.
The primary result is labeled “Steps to reach 1”. Keep the input definitions in view when comparing this result with another method.
Try a related calculation
The search stops at 10,000 steps.
For a related exercise, try the greatest common divisor.
A few questions, answered
How can I check the default inputs by hand?
13 goes to 40, 20, 10, 5, 16, 8, 4, 2 and 1.
Which rule does this calculator apply?
Even n→n/2, odd n→3n+1