maths.free › Frontiers › The Collatz conjecture
The Collatz conjecture
Halve it if even, triple-and-add-one if odd: does every start reach 1?
The statement. Start with any positive integer. If it is even, halve it; if odd, multiply by 3 and add 1. Repeat. The conjecture says you always reach 1. From 27 it takes 111 steps and climbs to 9,232 on the way.
In plain words. The rule is simple enough for a child, the behaviour looks random, and no one can prove the process never escapes to infinity or loops forever somewhere. Checked for every start below 2⁶⁸.
What you need first. Stage 1 (parity, division), Stage 10 (modular arithmetic, binary representation), Stage 8 (why “on average it shrinks” is a probabilistic statement, not a proof).
The parts. (1) The heuristic: an odd step multiplies by about 3/2 (3n + 1 is even, so it is immediately halved), an even step by 1/2; on average the sequence shrinks by a factor of √3/2 per step, so it “should” fall to 1. (2) Cycles: any loop other than 4 → 2 → 1 would have to be enormous (more than 10¹¹ elements). (3) Density results: almost all starting values eventually dip below any fixed bound (Tao, 2019): almost all, not all. (4) Why it resists: the problem mixes the additive structure (+1) with the multiplicative (×3, ÷2), and mathematics has few tools for that mix.
What is known. Verified to 2⁶⁸; Tao's almost-all result; no proof, and Erdős's verdict that “mathematics is not yet ripe for such problems”.
Collatz conjecture
The Collatz conjecture is one of the most famous unsolved problems in mathematics. The conjecture asks whether repeating two simple arithmetic operations will eventually transform every positive integer into 1. It concerns sequences of integers in which each term is obtained from the previous term as follows: if a term is even, the next term is one half of it. If a term is odd, the next term is 3 times the previous term plus 1. The conjecture is that these sequences always reach 1, no matter which positive integer is chosen to start the sequence. The conjecture has been shown to hold for all positive integers up to 2.36×10, but no general proof has been found.
It is named after the mathematician Lothar Collatz, who introduced the idea in 1937, two years after receiving his doctorate. The sequence of numbers involved is sometimes referred to as the hailstone sequence, hailstone numbers or hailstone numerals (because the values are usually subject to multiple descents and ascents like hailstones in a cloud), or as wondrous numbers.
Paul Erdős said about the Collatz conjecture: "Mathematics may not be ready for such problems." Jeffrey Lagarias stated in 2010 that the Collatz conjecture "is an extraordinarily difficult problem, completely out of reach of present day mathematics". However, though the Collatz conjecture itself remains open, efforts to solve the problem have led to new techniques and many partial results.
Statement of the problem
Consider the following operation on an arbitrary positive integer:
- If the number is even, divide it by two.
- If the number is odd, triple it and add one.
In modular arithmetic notation, define the function f as follows: \[f(n) = \begin{cases} n/2 &\text{if } n \equiv 0 \pmod{2},\\ 3n+1 & \text{if } n\equiv 1 \pmod{2} .\end{cases}\]
Now form a sequence by performing this operation repeatedly, beginning with any positive integer, and taking the result at each step as the input at the next.
In notation: \[a_i = \begin{cases}n & \text{for } i = 0, \\ f(a_{i-1}) & \text{for } i > 0 \end{cases}\] (that is: ai is the value of f applied to n recursively i times; ai = f (n)).
The Collatz conjecture is: This process will eventually reach the number 1, regardless of which positive integer is chosen initially. That is, for each \(n\), there is some \(i\) with \(a_i = 1\).
If the conjecture is false, it can only be because there is some starting number which gives rise to a sequence that does not contain 1. Such a sequence would either enter a repeating cycle that excludes 1, or increase without bound. No such sequence has been found.
The smallest i such that ai < a0 is called the stopping time of n. Similarly, the smallest k such that ak = 1 is called the total stopping time of n. If one of the indexes i or k does not exist, we say that the stopping time or the total stopping time, respectively, is infinite.
Condensed: the full section is in Wikipedia.
Empirical data
For instance, starting with n = 12 and applying the function f without "shortcut", one gets the sequence 12, 6, 3, 10, 5, 16, 8, 4, 2, 1 .
The number n = 19 takes longer to reach 1: 19, 58, 29, 88, 44, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1 .
The sequence for n = 27, listed and graphed below, takes 111 steps (41 steps through odd numbers, in bold), climbing as high as 9232 before descending to 1.
27, 82, 41, 124, 62, 31, 94, 47, 142, 71, 214, 107, 322, 161, 484, 242, 121, 364, 182, 91, 274, 137, 412, 206, 103, 310, 155, 466, 233, 700, 350, 175, 526, 263, 790, 395, 1186, 593, 1780, 890, 445, 1336, 668, 334, 167, 502, 251, 754, 377, 1132, 566, 283, 850, 425, 1276, 638, 319, 958, 479, 1438, 719, 2158, 1079, 3238, 1619, 4858, 2429, 7288, 3644, 1822, 911, 2734, 1367, 4102, 2051, 6154, 3077, 9232, 4616, 2308, 1154, 577, 1732, 866, 433, 1300, 650, 325, 976, 488, 244, 122, 61, 184, 92, 46, 23, 70, 35, 106, 53, 160, 80, 40, 20, 10, 5, 16, 8, 4, 2, 1
(sequence A008884 in the OEIS)
Numbers with a total stopping time longer than that of any smaller starting value form a sequence beginning with:
1, 2, 3, 6, 7, 9, 18, 25, 27, 54, 73, 97, 129, 171, 231, 313, 327, 649, 703, 871, 1161, 2223, 2463, 2919, 3711, 6171, ... (sequence A006877 in the OEIS).
The starting values whose maximum trajectory point is greater than that of any smaller starting value are as follows:
1, 2, 3, 7, 15, 27, 255, 447, 639, 703, 1819, 4255, 4591, 9663, 20895, 26623, 31911, 60975, 77671, 113383, 138367, 159487, 270271, 665215, 704511, ... (sequence A006884 in the OEIS)
Number of steps for n to reach 1 are
0, 1, 7, 2, 5, 8, 16, 3, 19, 6, 14, 9, 9, 17, 17, 4, 12, 20, 20, 7, 7, 15, 15, 10, 23, 10, 111, 18, 18, 18, 106, 5, 26, 13, 13, 21, 21, 21, 34, 8, 109, 8, 29, 16, 16, 16, 104, 11, 24, 24, ... (sequence A006577 in the OEIS)
less than 10 is 9, which has 19 steps,
less than 100 is 97, which has 118 steps,
less than 1000 is 871, which has 178 steps,
less than 10 is 6171, which has 261 steps,
less than 10 is 77031, which has 350 steps,
less than 10 is 837799, which has 524 steps,
less than 10 is 8400511, which has 685 steps,
less than 10 is 63728127, which has 949 steps,
less than 10 is 670617279, which has 986 steps,
less than 10 is 9780657630, which has 1132 steps,
less than 10 is 75128138247, which has 1228 steps,
less than 10 is 989345275647, which has 1348 steps. (sequence A284668 in the OEIS)
Condensed: the full section is in Wikipedia.
Supporting arguments
Although the conjecture has not been proven, most mathematicians who have looked into the problem think the conjecture is true because experimental evidence and heuristic arguments support it.
Experimental evidence
The conjecture has been checked by computer for all starting values up to 2 ≈ 2.36×10. All values tested so far converge to 1.
This computer evidence is still not rigorous proof that the conjecture is true for all starting values, as counterexamples may be found when considering very large positive integers, as in the case of the disproven Pólya conjecture and Mertens conjecture.
However, such verifications may have other implications. Certain constraints on any non-trivial cycle, such as lower bounds on the length of the cycle, can be proven based on the value of the lowest term in the cycle. Therefore, computer searches to rule out cycles that have a small lowest term can strengthen these constraints.
A probabilistic heuristic
If one considers only the odd numbers in the sequence generated by the Collatz process, then each odd number is on average 3/4 of the previous one. (More precisely, the geometric mean of the ratios of outcomes is 3/4.) This yields a heuristic argument that every Hailstone sequence should decrease in the long run, although this is not evidence against other cycles, only against divergence. The argument is not a proof, however, because it assumes that Hailstone sequences are assembled from uncorrelated probabilistic events. (It does rigorously establish that the 2-adic extension of the Collatz process has two division steps for every multiplication step for almost all 2-adic starting values.)
Stopping times
As proven by Riho Terras, almost every positive integer has a finite stopping time. In other words, almost every Collatz sequence reaches a point that is strictly below its initial value. The proof is based on the distribution of parity vectors and uses the central limit theorem.
In 2019, Terence Tao improved this result by showing, using logarithmic density, that almost all (in the sense of logarithmic density) Collatz orbits descend below any given function of the starting point, provided that this function diverges to infinity, no matter how slowly. Responding to this work, Quanta Magazine wrote that Tao "came away with one of the most significant results on the Collatz conjecture in decades".
Lower bounds
In a computer-aided proof, Krasikov and Lagarias showed that the number of integers in the interval [1,x] that eventually reach 1 is at least equal to x for all sufficiently large x.
Cycles
In this part, consider the shortcut form of the Collatz function \[f(n) = \begin{cases} \frac{n}{2} &\text{if } n \equiv 0 \pmod{2},\\ \frac{3n+1}{2} & \text{if } n \equiv 1 \pmod{2}. \end{cases}\] A cycle is a sequence (a0, a1, ..., aq) of distinct positive integers where f(a0) = a1, f(a1) = a2, ..., and f(aq) = a0.
The only known cycle is (1,2) of period 2, called the trivial cycle.
Cycle length
As of 2025, the best known bound on cycle length is 217976794617 (355504839929 without shortcut). In 1993, Eliahou proved that the period p of any non-trivial cycle is of the form \[p = 301994 a + 17087915 b + 85137581 c\] where a, b and c are non-negative integers, b ≥ 1 and ac = 0. This result is based on the simple continued fraction expansion of ln 3/ln 2.
k-cycles
A k-cycle is a cycle that can be partitioned into k contiguous subsequences, each consisting of an increasing sequence of odd numbers, followed by a decreasing sequence of even numbers. For instance, if the cycle consists of a single increasing sequence of odd numbers followed by a decreasing sequence of even numbers, it is called a 1-cycle.
Steiner (1977) proved that there is no 1-cycle other than the trivial (1; 2). Simons (2005) used Steiner's method to prove that there is no 2-cycle. Simons and de Weger (2005) extended this proof up to 68-cycles; there is no k-cycle up to k = 68. Hercher extended the method further and proved that there exists no k-cycle with k ≤ 91. As exhaustive computer searches continue, larger k values may be ruled out. To state the argument more intuitively; we do not have to search for cycles that have less than 92 subsequences, where each subsequence consists of consecutive ups followed by consecutive downs.
In reverse
There is another approach to prove the conjecture, which considers the bottom-up method of growing the so-called Collatz graph, a graph defined by the inverse relation \[R(n) = \begin{cases} \{2n\} & \text{if } n\equiv 0,1,2,3,5 \\ \left\{2n,\frac{n-1}{3}\right\} & \text{if } n\equiv 4 \end{cases} \pmod 6.\]
So, instead of proving that all positive integers eventually lead to 1, we can try to prove that 1 leads backwards to all positive integers. For any integer n, n ≡ 1 (mod 2) if and only if 3n + 1 ≡ 4 (mod 6). Equivalently, n − 1/3 ≡ 1 (mod 2) if and only if n ≡ 4 (mod 6). Conjecturally, this inverse relation forms a tree for positive integers except for the 1-2–4 loop (the inverse of the 4-2–1 loop of the unaltered function f defined in the Statement of the problem section of this article).
When the relation 3n + 1 of the function f is replaced by the common substitute "shortcut" relation 3n + 1/2, the Collatz graph is defined by the inverse relation, \[R(n) = \begin{cases} \{2n\} & \text{if } n\equiv 0,1 \\ \left\{2n,\frac{2n-1}{3}\right\} & \text{if } n\equiv 2 \end{cases} \pmod 3.\]
For any integer n, n ≡ 1 (mod 2) if and only if 3n + 1/2 ≡ 2 (mod 3). Equivalently, 2n − 1/3 ≡ 1 (mod 2) if and only if n ≡ 2 (mod 3). Conjecturally, this inverse relation forms a tree for positive integers except for a 1-2 loop (the inverse of the 1-2 loop of the function f(n) revised as indicated above).
Alternatively, replace the 3n + 1 with n′/H(n′) where n′ = 3n + 1 and H(n′) is the highest power of 2 that divides n′ (with no remainder). The resulting function f maps from odd numbers to odd numbers. Now suppose that for some odd number n, applying this operation k times yields the number 1 (that is, f(n) = 1). Then in binary, the number n can be written as the concatenation of strings wk wk−1 ... w1 where each wh is a finite and contiguous extract from the representation of 1/3. The representation of n therefore holds the repetends of 1/3, where each repetend is optionally rotated and then replicated up to a finite number of bits. It is only in binary that this occurs. Conjecturally, every binary string s that ends with a '1' can be reached by a representation of this form (where we may add or delete leading '0's to s).
As an abstract machine that computes in base two
Repeated applications of the Collatz function can be represented as an abstract machine that handles strings of bits. The machine will perform the following three steps on any odd number until only one 1 remains:
- Append 1 to the (right) end of the number in binary (giving 2n + 1);
- Add this to the original number by binary addition (giving 2n + 1 + n = 3n + 1);
- Remove all trailing 0s (that is, repeatedly divide by 2 until the result is odd).
As a parity sequence
For this section, consider the shortcut form of the Collatz function \[f(n) = \begin{cases} \frac{n}{2} &\text{if } n \equiv 0 \\ \frac{3n + 1}{2} & \text{if } n \equiv 1 \end{cases} \pmod{2}.\]
If P(...) is the parity of a number, that is P(2n) = 0 and P(2n + 1) = 1, then we can define the Collatz parity sequence (or parity vector) for a number n as pi = P(ai), where a0 = n, and ai+1 = f(ai).
Which operation is performed, 3n + 1/2 or n/2, depends on the parity. The parity sequence is the same as the sequence of operations.
Using this form for f(n), it can be shown that the parity sequences for two numbers m and n will agree in the first k terms if and only if m and n are equivalent modulo 2. This implies that every number is uniquely identified by its parity sequence, and moreover that if there are multiple Hailstone cycles, then their corresponding parity cycles must be different.
Applying the f function k times to the number n = 2a + b will give the result 3a + d, where d is the result of applying the f function k times to b, and c is how many increases were encountered during that sequence. For example, for 2a + 1 there are 3 increases as 1 iterates to 2, 1, 2, 1, and finally to 2 so the result is 3a + 2; for 2a + 1 there is only 1 increase as 1 rises to 2 and falls to 1 so the result is 3a + 1. When b is 2 − 1 then there will be k rises and the result will be 3a + 3 − 1. The power of 3 multiplying a is independent of the value of a; it depends only on the behavior of b. This allows one to predict that certain forms of numbers will always lead to a smaller number after a certain number of iterations: for example, 4a + 1 becomes 3a + 1 after two applications of f and 16a + 3 becomes 9a + 2 after four applications of f. Whether those smaller numbers continue to 1, however, depends on the value of a.
Guhitamo iyi Rimwe, i Bya. Rimwe munsi, Cyangwa Ubwoko:.
A Kigenga Konti: & OYA & Ongera Ibisobanuro: ku, A Ibijyana Bya, in Rimwe, na A Kubaza Bigyanye iyi Ipaji:. Imibare ni Gufungura Kuri, in Cyangwa OYA.
Kwiyandikisha IfashayinjiraByakoreshejwe
Icyo ari cyo cyose Ibimenyetso ya: i Byuzuye Insobanuro:, A Ishusho, na buri Ibaruwa: in.
Abaturage
Can I actually work on these?
You can understand them, which is the honest first step and what these pages are for. Working on them means the full path through the stages above and then the research literature, but every person who has made progress started by reading the statement.
Why are they unsolved if so many people have tried?
Usually because the existing tools provably cannot work (the barriers in P vs NP), or because the problem mixes two structures mathematics handles separately (additive and multiplicative in Goldbach and Collatz). A solution needs a genuinely new idea.
Bya iyi Ipaji: Bivuye Wikipedia (CC BY-SA 4.0). na -; Ikosa.
in Frontiers
The Riemann HypothesisNavier-Stokes existence and smoothnessP versus NPGoldbach's conjectureThe twin prime conjecture