Collatz conjecture calculator
This Collatz conjecture calculator shows the sequence for any starting number: the steps to reach 1, the highest value, the whole sequence and the longest sequences below a limit.
Example: Starting number n 27 · Record search up to 10,000 → Result: 27 reaches 1 after 111 steps. Source: Wikipedia – Collatz-Problem (3n+1-Vermutung). Updated: .
How it is calculated
The Collatz sequence halves even numbers and turns odd n into 3n+1 until it reaches 1. The starting number 27 needs 111 steps and climbs as high as 9232 on the way.
How it is calculated
n becomes n/2 if n is even, otherwise 3n+1. This repeats until 1 is reached (after which the cycle 1 → 4 → 2 → 1 would follow). The calculator uses arbitrarily large integers so intermediate values stay exact even for big starting numbers. It also searches below your limit for the starting numbers with the most steps; below 10,000 that is 6171 with 261 steps, below 1,000,000 it is 837,799 with 524 steps.
Good to know
- The Collatz conjecture says every positive starting number ends up at 1. It is unproven; no counterexample exists far beyond 10¹⁸.
- The sequence often climbs sharply before it falls – hence the name “hailstone sequence”.
- The step counts match sequence A006577 of the OEIS.
Frequently asked questions
What is the Collatz sequence?
A sequence of numbers: if the number is even, halve it; if it is odd, multiply by 3 and add 1. The conjecture says you always arrive at 1.
How many steps does 27 take?
111 steps, climbing as high as 9232. That is unusually long for such a small starting number.
Is the Collatz conjecture proven?
No. It has been confirmed by computer for all starting numbers beyond 2 · 10²⁰, but there is no general proof.
Which starting number below one million has the longest sequence?
837,799 with 524 steps.
Sources and legal basis
- Wikipedia – Collatz-Problem (3n+1-Vermutung)
- OEIS A006577 – Number of halving and tripling steps to reach 1 in the 3x+1 problem
As of: · Editorial policy
Related tools
- Sequence CalculatorSequence calculator: enter numbers, find the rule (arithmetic, geometric, Fibonacci, quadratic), get the next terms, the nth term and the sum of n terms.
- Happy Number CheckerHappy number checker: see every step of the digit-square sum until it reaches 1 or the 4 → 16 → … → 4 loop, spot happy primes and list all happy numbers.
- Prime Number CalculatorPrime number calculator: list all primes up to 10 million, check whether a number is prime or find the nth prime – with twin primes, gaps and working.
- Pascal Triangle CalculatorPascal triangle calculator: build rows up to 60, show the whole triangle, expand (a+b)^n and (a−b)^n and check properties such as the row sum and Fibonacci.
- Factorial calculatorFactorial calculator: n! exactly with every digit up to n = 5,000, plus digit count, trailing zeros and Stirling’s approximation – and big powers like 2^100.
- Factor Calculator – Find All DivisorsFactor calculator: enter a number and see all its factors, factor pairs, count and sum at once – plus common factors, GCF and LCM for two numbers.
- Online CalculatorCalculator online, free and instant: type or tap and see the answer as you go – order of operations, brackets, percent, square root, steps and a history list.
- Conic section calculatorConic section calculator: enter Ax² + Bxy + Cy² + Dx + Ey + F = 0 and get the type, standard form, center, axes, foci, vertices and eccentricity.
- Grade curve calculatorGrade curve calculator for teachers: paste the scores, pick a curve – raise the mean, scale to the top score, square root or bell – and see each new score.