Collatz Conjecture Calculator

Created by Davide Borchia
Reviewed by Anna Szczepanek, PhD and Rijk de Wet
Last updated: Apr 06, 2022

Simple things are sometimes surprising: explore a problem that makes mathematicians say, "I'm not going to do that" with our Collatz conjecture calculator!
Here you will learn:

  • What the Collatz conjecture is;
  • Why it is driving mathematicians crazy;
  • How to calculate the Collatz (or hailstone) sequences; and
  • How to use our Collatz conjecture calculator.

Ready to learn more about this mathematical mystery? Just be careful — trying to break the conjecture is dangerous. Remember to stop after a while!

What is the Collatz conjecture?

A "conjecture" is mathematics lingo for something we're pretty sure is true, but we can't find a way to prove it. Quite frustrating, probably! The Collatz sequence is formed by starting at a given integer number and continually:

The Collatz conjecture states that this sequence eventually reaches the value 1.

It is wonderfully simple, and yet every initial number ever tried returned 1 sooner or later — but no one has been able to prove it in almost a century!

Definition of the Collatz conjecture

The rules of the Collatz conjecture are, formally speaking:

xn+1={12xnif xn mod 2=03xn+1if xn mod 2=1x_{n+1} = \begin{cases} \frac{1}{2}x_{n} & \textrm{if}\ x_{n}\textrm{ mod }2=0 \\ 3x_{n}+1 & \textrm{if}\ x_{n}\textrm{ mod } 2=1 \end{cases}

We use the modulus operation to distinguish odd and even numbers. The second equation explains why the Collatz conjecture is sometimes also called the 3x+1 problem.

Behavior of Collatz sequences

Starting with any number, how will the sequence behave? Will it go up to infinity, or down to zero? Will it loop forever?

Choose an initial number first. Let's say 11. The sequence goes up and down:

11,34,17,52,26,13,40,20,10,5,16,8,4,2,1,4,2,111, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1, 4, 2, 1

See the end? Once it reaches 4, it collapses into the loop 4,2,1,4,2,14, 2, 1, 4, 2, 1 which it will never escape!

Collatz's conjecture for 11
Feeding 11 to the Collatz rules return this nice hailstone sequence!

Choose any other number, and eventually, the sequence will end up in the 4,2,14, 2, 1 loop. The oscillations may be big, as for x1=31x_1 = 31 which reaches a peak of more than 9,000 before falling down to 1.

This wildly unpredictably oscillating behavior earned these sequences the name "hailstone sequences", because the path of the sequence resembles that of a hailstone in a cloud before reaching the ground: swinging up and down before falling (preferably not on our heads).

The sequences follow a random pattern, and by just looking at the initial term, it's impossible to say how its sequence will behave without computing the next steps: mathematicians say that it is an undecidable problem. In layman's terms, there's no computer program that can take a number and say if it will or will not reach one.

This is why the 3x+1 problem is such a problem for mathematicians: at the moment, the only thing we can do is to brute force our way through numbers, trying to find one of them that would escape the 4,2,14, 2, 1 loop. And things don't look promising: researchers have tried numbers up to (are you ready?) 295,147,905,179,352,825,856295,147,905,179,352,825,856 — more seconds than have passed since the Big Bang! And not a single number didn't end up at 1.

And in an attempt to show the Collatz conjecture who's boss, researchers tried the number 2100,00012^{100,000}- 1 (the minus one was used to give the final flex, apparently). That number is 30,000 digits long, and guess what? After almost a million and a half steps, it ended up at 1.

Collatz by XKCD
XKCD's Cueball was caught by the Collatz conjecture, and his social life suffered because of it.

The search for a counterexample (one that doesn't end up in the 4,2,14, 2, 1 loop) is still undergoing, but many mathematicians think that this problem is out of the reach of our knowledge at this time.

The Collatz conjecture and its hailstone sequences are good examples of chaotic behaviour. If you need to balance it with some order, try out or Fibonacci sequence calculator or golden ratio calculator!

How does our Collatz conjecture calculator work?

All you have to do, is choose a number! Our Collatz conjecture calculator will show you:

  • A chart of the sequence;
  • The stopping time (the number of steps before reaching 1 for the first time); and
  • A table with all terms of the sequence.

Did you try a negative number to see if you could break the tool? We covered that too, but mathematicians are even more worried about it: there are three loops (starting at 1-1, 5-5, and 17-17) for negative integers, and no-one knows why they exist!

If you move to the advanced mode of the Collatz conjecture calculator, you can modify the parameters of the conjecture, but we don't guarantee that something interesting will come out of it. Try anyway — maybe the next mathematical nightmare will be named after you!

Now that you know what the Collatz conjecture is, you can also understand that it is unlikely you are going to use it in real life. There are more useful (but maybe less thought-provoking) sequences in math: we have some calculators for some of the more "conventional" of them:

FAQ

What is the Collatz's conjecture?

The Collatz's conjecture is an open problem in mathematics which asks if there are numbers that, given a simple set of rules, don't fall to 1 at the end of the sequence that is obtained by applying these rules.

Even if tested for amazingly big numbers, the sequences always reach 1: mathematicians still lack the tools to explain this, if it even can be explained!

Why a result of the Collatz's conjecture is called "hailstone sequence"?

Feeding a number to the rules of the Collatz's conjecture may result in the sequence oscillating wildly before finally reaching 1. Imagining 1 to be the ground, that "motion" resembles the path of a hailstone in a cloud during the process of growing, before the final fall to Earth.

Is there a solution to the Collatz's conjecture?

No, the Collatz's conjecture doesn't have a solution — yet! The best that mathematicians can do, is either to investigate the behavior of a sequence for increasingly big numbers, or to find an upper boundary under which all of the numbers collapse to 1.

How do I calculate Collatz's sequences?

The rules of the Collatz's sequence depend on the parity of the number itself. If the number is even, then the rule returns half the original number. If the number is odd, then we multiply the number by three, and add one.

How do I compute Collatz's sequence for 6?

The Collatz's sequence starting with 6 proceeds with 3 (half the previous number, since 6 is even), then 10 (3×3 + 1). It continues with 5, then 16. 16 is a power of two, and so it collapses with 8, 4, 2 and finally 1.

Here is the sequence: 6, 3, 10, 5, 16, 8, 4, 2, 1.

Davide Borchia
Collatz sequence rules:
xn+1 = 0.5xn  if xn is even
xn+1 = 3xn + 1  if xn is odd
To modify the rules, check out the advanced mode below.
Starting number (x₁)
Collatz conjecture: the sequence will eventually hit 1.
And it does hit 1 after 7 steps! This is its stopping time.
Show the table of sequence values?
No
Check out 6 similar sequences calculators 🔗
Arithmetic sequenceFibonacciGeometric sequence… 3 more
People also viewed…

Circle skirt

Circle skirt calculator makes sewing circle skirts a breeze.

Ellipse area

This ellipse area calculator will let you quickly calculate the area of an oval.

Parallelogram Perimeter

Parallelogram perimeter calculator finds out the perimeter of a parallelogram applying three useful formulas.

Titration

Use our titration calculator to determine the molarity of your solution.
Omni Calculator
Copyright by Omni Calculator sp. z o.o.
Privacy policy & cookies
main background