Article de reference

Collatz conjecture

Unsolved problem in mathematics For even numbers, divide by 2; For odd numbers, multiply by 3 and add 1. With enough repetition, do all positive integers converge to 1? More uns...

Page semi-protected

More unsolved problems in mathematics

Directed graph showing the orbits of small numbers under the Collatz map, skipping even numbers. The Collatz conjecture states that all paths eventually lead to 1.

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 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.

Numbers from 1 to 9999 and their corresponding total stopping time
Histogram of total stopping times for the numbers 1 to 108. Total stopping time is on the
Histogram of total stopping times for the numbers 1 to 109. Total stopping time is on the
Iteration time for inputs of 2 to 107.
Total Stopping Time: numbers up to 250, 1000, 4000, 20000, 100000, 500000
Total stopping time of numbers up to 250, 1000, 4000, 20000, 100000, 500000

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

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: 0 \\end{cases}" 0\end{cases ai={nfor i=0,f(ai1)for i>0{\displaystyle a_{i}={\begin{cases}n&{ ext{for }}i=0,\\f(a_{i-1})&{ ext{for }}i>0\end{cases}}}0\end{cases (that is:

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

Empirical data

For instance, starting with 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, ... 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, ... A006884 in the OEIS)

Number of steps for A006577 in the OEIS)

The starting value having the largest total stopping time while being

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 104 is 6171, which has 261 steps,
less than 105 is A284668 in the OEIS)

These numbers are the lowest ones with the indicated step count, but not necessarily the only ones below the given limit. As an example, powers of two, since Directed graph showing the orbits of the first 1000 numbers.

Directed graph showing the orbits of the first 1000 numbers.
  • The x axis represents starting number, the y axis represents the highest number reached during the chain to 1. This plot shows a restricted y axis: some x values produce intermediates as high as 2.7×107 (for x = 9663)
    The The same plot as the previous one but on log scale, so all y values are shown. The first thick line towards the middle of the plot corresponds to the tip at 27, which reaches a maximum at 9232.
    The same plot as the previous one but on log scale, so all The tree of all the numbers having fewer than 20 steps.
    The tree of all the numbers having fewer than 20 steps.
  • Collatz Conjecture 100M
    The number of iterations it takes to get to one for the first 100 million numbers.
  • Collatz conjecture paths for 5000 random starting points below 1 million.
    Collatz conjecture paths for 5000 random starting points below 1 million.
  • Supporting arguments

    Although the conjecture has not been proven, most mathematicianscounterexamples 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 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

    The first 21 levels of the Collatz graph generated in bottom-up fashion. The graph includes all numbers with an orbit length of 21 or less.

    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

    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 if and only iftree for positive integers except for the 1–2–4 loop (the inverse of the 4–2–1 loop of the unaltered function Statement of the problem section of this article).

    When the relation

    For any integer power of 2 that divides remainder). The resulting function odd numbers to odd numbers. Now suppose that for some odd number binary, the number stringsrepetends of abstract machine that handles strings of bits. The machine will perform the following three steps on any odd number until only one 1 remains:

    1. Append binary as

      If

      Hailstone sequences can be computed by the 2-tag system with production rules

      CycleOdd-value cycle lengthFull cycle length1 → 4 → 2 → 1...13−1 → −2 → −1...12−5 → −14 → −7 → −20 → −10 → −5...25−17 → −50 → −25 → −74 → −37 → −110 → −55 → −164 → −82 → −41 → −122 → −61 → −182 → −91 → −272 → −136 → −68 → −34 → −17...718

      The generalized Collatz conjecture is the assertion that every integer, under iteration by 2-adic integers, which contains the ring of rationals with odd denominators as a subring.

      When using the "shortcut" definition of the Collatz map, it is known that any periodic parity sequence is generated by exactly one rational. Conversely, it is conjectured that every rational with an odd denominator has an eventually cyclic parity sequence (Periodicity Conjecture).

      If a parity cycle has length

      For example, the parity cycle

      Any cyclic permutation of

      For a one-to-one correspondence, a parity cycle should be irreducible, that is, not partitionable into identical sub-cycles. As an illustration of this, the parity cycle

    2-adic extension

    The function

    Define the parity vector function

    The function isometry. Consequently, every infinite parity sequence occurs for exactly one 2-adic integer, so that almost all trajectories are acyclic in

    An equivalent formulation of the Collatz conjecture is that

    Iterating on real or complex numbers
    Cobweb plot of the orbit 10 → 5 → 8 → 4 → 2 → 1 → ... in an extension of the Collatz map to the real line.

    The Collatz map can be extended to the real line by choosing any function which evaluates to

    and use them as switches for our desired values:

    One such choice is

    Letherman, Schleicher, and Wood extended the study to the complex plane. They used Chamberland's function for complex sine and cosine and added the extra term

    is an interpolation of the Collatz map to the complex plane. The reason for adding the extra term is to make all integers critical points of

    A Collatz fractal centered at the origin, with real parts from –5 to 5.

    Most of the points have orbits that diverge to infinity. Coloring these points based on how fast they diverge produces the image on the left, for

    Julia set of the exponential interpolation.

    There are many other ways to define a complex interpolating function, such as using the complex exponential instead of sine and cosine:

    which exhibit different dynamics. In this case, for instance, if

    As a parity sequence above gives a way to speed up simulation of the sequence. To jump ahead precomputation and storage to speed up the resulting calculation by a factor of space–time tradeoff.

    Modular restrictions

    For the special purpose of searching for a counterexample to the Collatz conjecture, this precomputation leads to an even more important acceleration, used by Tomás Oliveira e Silva in his computational confirmations of the Collatz conjecture up to large values ofA075677 in the OEIS).

    Some properties of the Syracuse function are:

    • For all function iteration notation.)
    • For all odd John Horton Conway proved that a natural generalization of the Collatz problem is algorithmically undecidable.

      Specifically, he considered functions of the form

      Closer to the Collatz problem is the following universally quantified problem:

      Given arithmetical hierarchy; specifically, it is

    In computational complexity

    The Collatz and related conjectures are often used when studying computational complexity. The connection is made through the busy beaver function, where BB(n) is the maximum number of steps taken by any n-state Turing machine that halts. There is a 15-state Turing machine that halts if and only if the following conjecture by Paul Erdős (closely related to the Collatz conjecture) is false: for all n > 8 there is at least one digit 2 in the base 3 representation of 2n. Hence if BB(15) was known, and this machine did not stop in that number of steps, it would be known to run forever and hence no counterexamples exist (which proves the conjecture true). This is a completely impractical way to settle the conjecture; instead it is used to suggest that BB(15) will be very hard to compute, at least as difficult as settling this Collatz-like conjecture.

    In 2024, a six-state machine was found for which determining whether it halts involves solving a Collatz-like problem called the antihydra problem. As proofs of even simple conjectures of this nature are not currently known, this suggests that BB(6) will be very hard to compute.