Virtual laboratory/Mathematics/Number theory/The Collatz problem (3n+1)

The Collatz problem (3n+1)

An extension of the topics of divisibility and sequences. The rule: halve an even number, multiply an odd number by 3 and add 1. For every number checked (up to ~2.95·10²⁰) the sequence always reaches 1 — but no one has proved it for all natural numbers. It is one of the most famous unsolved problems in mathematics, posed by Lothar Collatz in 1937.

The Collatz problem (3n+1)
Mathematics · Number theory · The Collatz problem (3n+1) (1937)
Starting number nn7
Has it been proved that every number under the 3n+1 procedure always reaches 1?
starting number n
7
sequence length (steps)
16
maximum value
52
end of sequence
1 ✓
🎯 Challenge: count the steps to 1
streak: 0

I will give you a starting number n. Count how many steps of the 3n+1 rule it takes for the sequence to reach 1.

What just happened?

The Collatz problem (also known as the 3n+1 conjecture, the Syracuse problem or the Ulam conjecture) is probably the simplest-to-state unsolved problem in mathematics. You take any natural number and repeat a single rule.

The rule (Lothar Collatz, 1937):

n  ⟼  {n2if n even3n+1if n oddn \;\longmapsto\; \begin{cases} \tfrac{n}{2} & \text{if } n \text{ even}\\[4pt] 3n+1 & \text{if } n \text{ odd} \end{cases}

For an even number — you halve it; for an odd number — you multiply by 3 and add 1; then you repeat. The Collatz conjecture says that for every natural number the sequence eventually reaches 1 (and then falls into the cycle 1→4→2→11 \to 4 \to 2 \to 1).

Checked for astronomically many numbers…

The conjecture has been confirmed by computer for all numbers up to nearly 3⋅10203\cdot 10^{20} (more precisely ≈ 2.95·10²⁰) — and it always holds. The trajectories can be surprisingly chaotic: the number 27 needs as many as 111 steps and “rises” to 9232 before dropping to 1 (you can see this on the graph after choosing 27).

…but no one has proved it

Despite the simplicity of the rule and over 85 years of attempts by the finest mathematicians, no one can prove that it works for all natural numbers — nor find even a single counterexample. Paul Erdős, offering $500 for a solution, said: “Mathematics may not be ready for such problems.”

Why this matters for your exams:

It is an extension of the topics of divisibility and sequences — and a fascinating curiosity about the limits of mathematical knowledge. It shows a deep truth: simplicity of statement does not guarantee simplicity of solution. A child can understand the 3n+1 rule, and yet it remains one of the most famous open problems in mathematics. Sometimes the shortest questions are the hardest.

Remember: the Collatz rule is n→n2n \to \tfrac{n}{2} (even) or n→3n+1n \to 3n+1 (odd). For all numbers checked, the sequence ends at 1 — but there is no general proof. It is still an open problem.

Illustrative model · NexTutor Virtual Laboratory

Enjoyed the experiment? Share it.

It's free — send it to friends from school.

Theory & formulas

The rule

f(n)={n2n even3n+1n oddf(n)=\begin{cases}\dfrac{n}{2} & n\text{ even}\\[4pt] 3n+1 & n\text{ odd}\end{cases} We iterate and watch whether the sequence reaches 11.

The conjecture

For every natural number the sequence eventually reaches 11 (and falls into the loop 4→2→14\to2\to1).

Status

It has been verified for all numbers up to about 2.95⋅10202.95\cdot10^{20}, but there is no general proof — a famous open problem (Collatz, 1937).

Notation: nn a natural number, f(n)f(n) the result of one step of the procedure.

Frequently asked questions

›

Has it been proved that the 3n+1 procedure always reaches 1?

No — it is an open problem, despite having been checked for astronomically many numbers (up to ~2.95·10²⁰).

›

What is the Collatz rule?

For an even number: divide by 2; for an odd number: multiply by 3 and add 1; repeat.

›

Why is the Collatz problem so famous?

Because a child can understand the rule, yet the finest mathematicians have been unable to solve it since 1937.

Teaching? Embed this experiment on your site.

Free widget — paste it on your school site, blog or notes. It links to the full version.

Teaching a class or tutoring? Guide students in NexTutor →