Collatz Conjecture (3n+1) Calculator

Use this handy online tool to calculate and graph the Collatz sequence for a given positive integer n.

Collatz Conjecture Calculator

What is the Collatz Conjecture?

The Collatz conjecture is widely regarded as one of the unsolved problems in mathematics. It is named after a mathematician named Lothar Collatz, who first introduced the concept in 1937, two years after completing his PhD. The Collatz conjecture, which is also referred to as the Ulam conjecture, Kakutani's problem, the 3n + 1 conjecture, Hasse's algorithm, the Thwaites conjecture, or the Syracuse problem, involves a sequence of numbers known as wondrous numbers or hailstone numbers.

The Collatz mathematical conjecture asserts that each term in a sequence starting with any positive integer n, is obtained from the previous term in the following way:

If the previous term is even, the next term will be half the previous term (n/2). If the previous term is odd, the next term will be 3 times the previous term plus 1 (3n+1).

The conjecture asserts that, regardless of the value of n, the sequence will always reach 1, at which point we enter a continual loop ranging from 1 to 4, to 2 and back to 1.

For example, if n = 12, we have the following sequence: 12, 6, 3, 10, 5, 16, 8, 4, 2, 1, ... It took 9 steps to reach 1.

Rating: 4.8/5 (9 votes)