# Collatz conjecture

(Redirected from Collatz fractal)
 Unsolved problem in mathematics:Does the Collatz sequence eventually reach 1 for all positive integer initial values?(more unsolved problems in mathematics)

The Collatz conjecture is a conjecture in mathematics that concerns a sequence defined as follows: start with any positive integer n. Then each term is obtained from the previous term as follows: if the previous term is even, the next term is one half the previous term. If the previous term is odd, the next term is 3 times the previous term plus 1. The conjecture is that no matter what value of n, the sequence will always reach 1.

The conjecture is named after Lothar Collatz, who introduced the idea in 1937, two years after receiving his doctorate.[1] It is also known as the 3n + 1 problem, the 3n + 1 conjecture, the Ulam conjecture (after Stanisław Ulam), Kakutani's problem (after Shizuo Kakutani), the Thwaites conjecture (after Sir Bryan Thwaites), Hasse's algorithm (after Helmut Hasse), or the Syracuse problem.[2][4] The sequence of numbers involved is sometimes referred to as the hailstone sequence or hailstone numbers (because the values are usually subject to multiple descents and ascents like hailstones in a cloud),[5][6] or as wondrous numbers.[7]

Paul Erdős said about the Collatz conjecture: "Mathematics may not be ready for such problems."[8] He also offered \$500 for its solution.[9] Jeffrey Lagarias in 2010 claimed that based only on known information about this problem, "this is an extraordinarily difficult problem, completely out of reach of present day mathematics."[10]

## Statement of the problem

Numbers from 1 to 9999 and their corresponding total stopping time
Histogram of total stopping times for the numbers 1 to 100 million. Total stopping time is on the x axis, frequency on the y axis.
Iteration time for inputs of 2 to 10,000,000

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:

${\displaystyle 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:

${\displaystyle a_{i}={\begin{cases}n&{\text{for }}i=0\\f(a_{i-1})&{\text{for }}i>0\end{cases}}}$

(that is: ${\displaystyle a_{i}}$ is the value of ${\displaystyle f}$ applied to ${\displaystyle n}$ recursively ${\displaystyle i}$ times; ${\displaystyle a_{i}=f^{i}(n)}$).

The Collatz conjecture is: This process will eventually reach the number 1, regardless of which positive integer is chosen initially.

That smallest i such that ai = 1 is called the total stopping time of n.[3] The conjecture asserts that every n has a well-defined total stopping time. If, for some n, such an i doesn't exist, we say that n has infinite total stopping time and the conjecture is false.

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 might enter a repeating cycle that excludes 1, or increase without bound. No such sequence has been found.

## Examples

For instance, starting with n = 12, one gets the sequence 12, 6, 3, 10, 5, 16, 8, 4, 2, 1.

n = 19, for example, 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 large font), climbing to a high of 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)

The longest progression for any initial starting number

less than 10 is 9, which has 19 steps,
less than 100 is 97, which has 118 steps,
less than 1,000 is 871, which has 178 steps,
less than 10,000 is 6,171, which has 261 steps,
less than 100,000 is 77,031, which has 350 steps,
less than 1 million is 837,799, which has 524 steps,
less than 10 million is 8,400,511, which has 685 steps,
less than 100 million is 63,728,127, which has 949 steps,
less than 1 billion is 670,617,279, which has 986 steps,
less than 10 billion is 9,780,657,630, which has 1132 steps,[11]
less than 100 billion is 75,128,138,247, which has 1228 steps,
less than 1 trillion is 989,345,275,647, which has 1348 steps,
less than 10 trillion is 7,887,663,552,367, which has 1563 steps,
less than 100 trillion is 80,867,137,596,217, which has 1662 steps,
less than 1 quadrillion is 942,488,749,153,153, which has 1862 steps,
less than 10 quadrillion is 7,579,309,213,675,935, which has 1958 steps, and
less than 100 quadrillion is 93,571,393,692,802,302, which has 2091 steps.[12]

Note: these numbers are the lowest ones with the indicated step count, but not necessarily the only ones below the given limit. For instance, 9,780,657,631 has 1132 steps as well.

The powers of two converge to one quickly because ${\displaystyle 2^{n}}$ is halved ${\displaystyle n}$ times to reach one, and is never increased.

## Cycles

In this part, consider the "shortcut" form of the Collatz function

${\displaystyle T(x)={\begin{cases}x/2&{\text{if }}x\equiv 0{\pmod {2}},\\(3x+1)/2&{\text{if }}x\equiv 1{\pmod {2}}.\end{cases}}}$

A cycle is a sequence ${\displaystyle (a_{0};a_{1};\ldots ;a_{q})}$ of distinct positive integers where ${\displaystyle T(a_{0})=a_{1}}$, ${\displaystyle T(a_{1})=a_{2}}$, ..., and ${\displaystyle T(a_{q})=a_{0}}$.

The only known cycle is ${\displaystyle (1;2)}$ of length 2, called the trivial cycle.

### Cycle length

The length of a non-trivial cycle is known to be at least ${\displaystyle 17087915}$.[13] In fact, Eliahou (1993) proved that the period ${\displaystyle p}$ of any non-trivial cycle is of the form

${\displaystyle p=301994a+17087915b+85137581c}$

where ${\displaystyle b\geq 1}$ and ${\displaystyle ac=0}$. This result is based on the continued fraction expansion of ${\displaystyle \log 3/\log 2}$.

A similar reasoning that accounts for the recent verification of the conjecture up to ${\displaystyle 5\times 10^{18}}$ leads to the improved lower bound ${\displaystyle 10439860591\approx 1.04\times 10^{9}}$ (or ${\displaystyle 17026679261}$ without "shortcut").

### k-cycles

A k-cycle is a cycle that can be partitioned into 2k contiguous subsequences: k increasing sequences of odd numbers alternating with k decreasing sequences 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.[14]

Steiner (1977) proved that there is no 1-cycle other than the trivial (1;2).[15] Simons (2004) used Steiner's method to prove that there is no 2-cycle.[16] Simons & de Weger (2005) extended this proof up to 68-cycles: there is no k-cycle up to k = 68.[14] Beyond 68, this method gives upper bounds for the elements in such a cycle: for example, if there is a 75-cycle, then at least one element of the cycle is less than 2385×250.[14] Therefore, as exhaustive computer searches continue, larger cycles may be ruled out. To state the argument more intuitively: we need not look for cycles that have at most 68 trajectories, where each trajectory consists of consecutive ups followed by consecutive downs.

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

As of 2017, the conjecture has been checked by computer for all starting values up to 87 * 260.[17] All initial values tested so far eventually end in the repeating cycle (4; 2; 1), which has only three terms. From this lower bound on the starting value, a lower bound can also be obtained for the number of terms a repeating cycle other than (4; 2; 1) must have.[18] When this relationship was established in 1981, the formula gave a lower bound of 35,400 terms.[18]

This computer evidence is not a proof that the conjecture is true. As shown in the cases of the Pólya conjecture, the Mertens conjecture, and Skewes' number, sometimes a conjecture's only counterexamples are found when using very large numbers.

### 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.[19] (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 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.)

And even if the probabilistic reasoning were rigorous, this would still imply only that the conjecture is almost surely true for any given integer, which does not necessarily imply that it is true for all integers.

### Rigorous 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 x0.84 for all sufficiently large x.[20]

## Other formulations of the conjecture

### In reverse

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. The Collatz graph is a graph defined by the inverse relation

${\displaystyle R(n)={\begin{cases}\{2n\}&{\text{if }}n\equiv 0,1,2,3,5\\\{2n,(n-1)/3\}&{\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) iff 3n + 1 ≡ 4 (mod 6). Equivalently, (n − 1)/3 ≡ 1 (mod 2) iff n ≡ 4 (mod 6). Conjecturally, this inverse relation forms a tree 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,

${\displaystyle R(n)={\begin{cases}\{2n\}&{\text{if }}n\equiv 0,1\\\{2n,(2n-1)/3\}&{\text{if }}n\equiv 2\end{cases}}{\pmod {3}}.}$

For any integer n, n ≡ 1 (mod 2) iff (3n + 1)/2 ≡ 2 (mod 3). Equivalently, (2n − 1)/3 ≡ 1 (mod 2) iff n ≡ 2 (mod 3). Conjecturally, this inverse relation forms a tree 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, ${\displaystyle f^{k}(n)=1}$). Then in binary, the number n can be written as the concatenation of strings wk wk−1w1 where each wh is a finite and contiguous extract from the representation of 1/3h.[21] The representation of n therefore holds the repetends of 1/3h, where each repetend is optionally rotated and then replicated up to a finite number of bits. It is only in binary that this occurs.[22] 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:

1. Append 1 to the (right) end of the number in binary (giving 2n + 1);
2. Add this to the original number by binary addition (giving 2n + 1 + n = 3n + 1);
3. Remove all trailing "0"s (i.e. repeatedly divide by two until the result is odd).

This prescription is plainly equivalent to computing a Hailstone sequence in base two.

#### Example

The starting number 7 is written in base two as 111. The resulting Hailstone sequence is:

           111
1111
10110
10111
100010
100011
110100
11011
101000
1011
10000


### As a parity sequence

For this section, consider the Collatz function in the slightly modified form

${\displaystyle f(n)={\begin{cases}n/2&{\text{if }}n\equiv 0\\(3n+1)/2&{\text{if }}n\equiv 1\end{cases}}{\pmod {2}}.}$

This can be done because when n is odd, 3n + 1 is always even.

If P(…) is the parity of a number, that is P(2n) = 0 and P(2n + 1) = 1, then we can define the Hailstone parity sequence (or parity vector) for a number n as pi = P(ai), where a0 = n, and ai+1 = f(ai).

What 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 2k. 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.[3][23]

Applying the f function k times to the number n=a·2k + b will give the result a·3c + 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 (e.g. for a·25 + 1 there are 3 increases as 1 iterates to 2, 1, 2, 1, and finally to 2 so the result is a·33+2; for a·22 + 1 there is only 1 increase as 1 rises to 2 and falls to 1 so the result is a·3 + 1). When b is 2k - 1 then there will be k rises and the result will be 2·a·3k - 1. The factor 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, e.g. 4a + 1 becomes 3a + 1 after two applications of f and 16a + 3 becomes 9·a + 2 after 4 applications of f. Whether those smaller numbers continue to 1, however, depends on the value of a.

### As a tag system

For the Collatz function in the form

${\displaystyle f(n)={\begin{cases}n/2&{\text{if }}n\equiv 0\\(3n+1)/2&{\text{if }}n\equiv 1.\end{cases}}{\pmod {2}}}$

Hailstone sequences can be computed by the extremely simple 2-tag system with production rules abc, ba, caaa. In this system, the positive integer n is represented by a string of n a, and iteration of the tag operation halts on any word of length less than 2. (Adapted from De Mol.)

The Collatz conjecture equivalently states that this tag system, with an arbitrary finite string of a's as the initial word, eventually halts (see Tag system#Example: Computation of Collatz sequences for a worked example).

## Extensions to larger domains

### Iterating on all integers

An extension to the Collatz conjecture is to include all integers, not just positive integers. Leaving aside the cycle 0 → 0 which cannot be entered from outside, there are a total of 4 known cycles, which all nonzero integers seem to eventually fall into under iteration of f. These cycles are listed here, starting with the well-known cycle for positive n:

Odd values are listed in large bold. Each cycle is listed with its member of least absolute value (which is always odd) first.

Cycle Odd-value cycle length Full cycle length
1 → 4 → 2 → 1 1 3
−1 → −2 → −1 1 2
−5 → −14 → −7 → −20 → −10 → −5 2 5
−17 → −50 → −25 → −74 → −37 → −110 → −55 → −164 → −82 → −41 → −122 → −61 → −182 → −91 → −272 → −136 → −68 → −34 → −17 7 18

The generalized Collatz conjecture is the assertion that every integer, under iteration by f, eventually falls into one of the four cycles above or the cycle 0 → 0. The 0 → 0 cycle is often regarded as "trivial" by the argument, as it is only included for the sake of completeness.

### Iterating on rationals with odd denominators

The Collatz map can be extended to (positive or negative) rational numbers which have odd denominators when written in lowest terms. The number is taken to be odd or even according to whether its numerator is odd or even. A closely related fact is that the Collatz map extends to the ring of 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.[24] Conversely, it is conjectured that every rational with an odd denominator has an eventually cyclic parity sequence (Periodicity Conjecture [3]).

If a parity cycle has length n and includes odd numbers exactly m times at indices k0 < … < km−1, then the unique rational which generates immediately and periodically this parity cycle is

${\displaystyle {\frac {3^{m-1}2^{k_{0}}+\cdots +3^{0}2^{k_{m-1}}}{2^{n}-3^{m}}}.}$

(1)

For example, the parity cycle (1 0 1 1 0 0 1) has length 7 and four odd terms at indices 0, 2, 3, and 6. It is repeatedly generated by the fraction

${\displaystyle {\frac {3^{3}2^{0}+3^{2}2^{2}+3^{1}2^{3}+3^{0}2^{6}}{2^{7}-3^{4}}}={\frac {151}{47}}}$

as the latter leads to the rational cycle

${\displaystyle {\frac {151}{47}}\rightarrow {\frac {250}{47}}\rightarrow {\frac {125}{47}}\rightarrow {\frac {211}{47}}\rightarrow {\frac {340}{47}}\rightarrow {\frac {170}{47}}\rightarrow {\frac {85}{47}}\rightarrow {\frac {151}{47}}}$.

Any cyclic permutation of (1 0 1 1 0 0 1) is associated to one of the above fractions. For instance, the cycle (0 1 1 0 0 1 1) is produced by the fraction

${\displaystyle {\frac {3^{3}2^{1}+3^{2}2^{2}+3^{1}2^{5}+3^{0}2^{6}}{2^{7}-3^{4}}}={\frac {250}{47}}}$.

For a one-to-one correspondance, a parity cycle should be irreducible, i.e., not partitionable into identical sub-cycles. As an illustration of this, the parity cycle (1 1 0 0 1 1 0 0) and its sub-cycle (1 1 0 0) are associated to the same fraction 5/7 when reduced to lowest terms.

In this context, assuming the validity of the Collatz conjecture implies that (1 0) and (0 1) are the only parity cycles generated by positive whole numbers (1 and 2, respectively).

If the odd denominator ${\displaystyle d}$ of a rational is not a multiple of 3, then all the iterates have the same denominator and the sequence of numerators can be obtained by applying the "3n+d" generalization of the Collatz function

${\displaystyle T_{d}(x)={\begin{cases}x/2&{\text{if }}x\equiv 0{\pmod {2}},\\(3x+d)/2&{\text{if }}x\equiv 1{\pmod {2}}.\end{cases}}}$

The function

${\displaystyle T(x)={\begin{cases}x/2&{\text{if }}x\equiv 0{\pmod {2}}\\(3x+1)/2&{\text{if }}x\equiv 1{\pmod {2}}\end{cases}}}$

is well-defined on the ring ${\displaystyle \mathbb {Z} _{2}}$ of 2-adic integers, where it is continuous and measure-preserving with respect to the 2-adic measure. Moreover, its dynamics is known to be ergodic.[3]

Define the parity vector function ${\displaystyle Q}$ acting on ${\displaystyle \mathbb {Z} _{2}}$ as

${\displaystyle Q(x)=\sum _{k=0}^{\infty }\left(T^{k}(x)\mod 2\right)2^{k}}$.

The function ${\displaystyle Q}$ is a 2-adic isometry.[25] Consequently, every infinite parity sequence occurs for exactly one 2-adic integer, so that almost all trajectories are acyclic in ${\displaystyle \mathbb {Z} _{2}}$.

An equivalent formulation of the Collatz conjecture is that ${\displaystyle Q(\mathbb {Z} ^{+})\subset {\frac {1}{3}}\mathbb {Z} }$.

### Iterating on real or complex numbers

Cobweb plot of the orbit 10-5-8-4-2-1-2-1-2-1-etc. in the real extension of the Collatz map (optimized by replacing "3n + 1" with "(3n + 1)/2")

The Collatz map can be viewed as the restriction to the integers of the smooth real and complex map

${\displaystyle f(z)={\frac {1}{2}}z\cos ^{2}\left({\frac {\pi }{2}}z\right)+(3z+1)\sin ^{2}\left({\frac {\pi }{2}}z\right).}$

If the standard Collatz map defined above is optimized by replacing the relation 3n + 1 with the common substitute "shortcut" relation (3n + 1)/2, it can be viewed as the restriction to the integers of the smooth real and complex map

${\displaystyle f(z)={\frac {1}{2}}z\cos ^{2}\left({\frac {\pi }{2}}z\right)+{\frac {(3z+1)}{2}}\sin ^{2}\left({\frac {\pi }{2}}z\right).}$
Collatz map fractal in a neighbourhood of the real line

The point of view of iteration on the real line was investigated by Chamberland (1996),[26]. He showed that the conjecture does not hold for real numbers since there are infinitely many fixed points, as well as orbits escaping monotonically to infinity. He also showed that there is, at least, another attracting cycle : 1.1925 - 2.1386.

On the complex plane,it was investigated by Letherman, Schleicher, and Wood (1999).[27] Most points of the plane diverge to infinity, as seen in blue on the illustration below. The boundary between diverging and non-diverging regions show a fractal pattern called the "Collatz fractal".

## Optimizations

The section As a parity sequence above gives a way to speed up simulation of the sequence. To jump ahead k steps on each iteration (using the f function from that section), break up the current number into two parts, b (the k least significant bits, interpreted as an integer), and a (the rest of the bits as an integer). The result of jumping ahead k steps can be found as:

f k(a 2k + b) = a 3c(b) + d(b).

The c (or better 3c) and d arrays are precalculated for all possible k-bit numbers b, where d(b) is the result of applying the f function k times to b, and c(b) is the number of odd numbers encountered on the way.[28] For example, if k=5, you can jump ahead 5 steps on each iteration by separating out the 5 least significant bits of a number and using:

c(0..31) = {0,3,2,2,2,2,2,4,1,4,1,3,2,2,3,4,1,2,3,3,1,1,3,3,2,3,2,4,3,3,4,5}
d(0..31) = {0,2,1,1,2,2,2,20,1,26,1,10,4,4,13,40,2,5,17,17,2,2,20,20,8,22,8,71,26,26,80,242}.

This requires 2k precomputation and storage to speed up the resulting calculation by a factor of k, a 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 of n. If, for some given b and k, the inequality

f k(a 2k + b) = a 3c(b) + d(b) < a 2k + b

holds for all a, then the first counterexample, if it exists, cannot be b modulo 2k.[18] For instance, the first counterexample must be odd because f(2n) = n, smaller than 2n; and it must be 3 mod 4 because f2(4n + 1) = 3n + 1, smaller than 4n + 1. For each starting value a which is not a counterexample to the Collatz conjecture, there is a k for which such an inequality holds, so checking the Collatz conjecture for one starting value is as good as checking an entire congruence class. As k increases, the search only needs to check those residues b that are not eliminated by lower values of k. Only an exponentially small fraction of the residues survive.[29] For example, the only surviving residues mod 32 are 7, 15, 27, and 31.

## Syracuse function

If ${\displaystyle k}$ is an odd integer, then ${\displaystyle 3k+1}$ is even, so ${\displaystyle 3k+1=2^{a}k^{\prime }}$ with ${\displaystyle k^{\prime }}$ odd and ${\displaystyle a\geq 1}$. The Syracuse function is the function ${\displaystyle f}$ from the set ${\displaystyle I}$ of odd integers into itself, for which ${\displaystyle f(k)=k^{\prime }}$ (sequence A075677 in the OEIS).

Some properties of the Syracuse function are:

• ${\displaystyle \forall k\in I,f(4k+1)=f(k)}$. (Because ${\displaystyle 3(4k+1)+1=12k+4=4(3k+1)}$.)
• In more generality: For all ${\displaystyle p\geq 1}$ and odd ${\displaystyle h}$, ${\displaystyle f^{p-1}(2^{p}h-1)=2\cdot 3^{p-1}h-1}$. (Here ${\displaystyle f^{p-1}}$ is function iteration notation.)
• For all odd ${\displaystyle h}$,${\displaystyle f(2h-1)\leq {\frac {3h-1}{2}}}$

The Collatz conjecture is equivalent to the statement that, for all ${\displaystyle k}$ in ${\displaystyle I}$, there exists an integer ${\displaystyle n\geq 1}$ such that ${\displaystyle f^{n}(k)=1}$.

## Undecidable generalizations

In 1972, J. H. Conway proved that a natural generalization of the Collatz problem is algorithmically undecidable.[30]

Specifically, he considered functions of the form

${\displaystyle g(n)=a_{i}n+b_{i},{n\equiv i{\pmod {P}}}}$

where ${\displaystyle a_{0},b_{0},\ldots ,a_{P-1},b_{P-1}}$ are rational numbers which are so chosen that ${\displaystyle g(n)}$ is always integral.

The standard Collatz function is given by ${\displaystyle P=2}$, ${\displaystyle a_{0}={\tfrac {1}{2}}}$, ${\displaystyle b_{0}=0}$, ${\displaystyle a_{1}=3}$, ${\displaystyle b_{1}=1}$. Conway proved that the problem:

Given g and n, does the sequence of iterates ${\displaystyle g^{k}(n)}$ reach 1?

is undecidable, by representing the halting problem in this way. Closer to the Collatz problem is the following universally quantified problem:

Given g does the sequence of iterates ${\displaystyle g^{k}(n)}$ reach 1, for all ${\displaystyle n>0}$?

Modifying the condition in this way can make a problem either harder or easier to solve (intuitively, it is harder to justify a positive answer but might be easier to justify a negative one). Kurtz and Simon[31] proved that the above problem is, in fact, undecidable and even higher in the arithmetical hierarchy, specifically ${\displaystyle \Pi _{2}^{0}}$-complete. This hardness result holds even if one restricts the class of functions g by fixing the modulus P to 6480.[32]

• The Ultimate Challenge: the 3x+1 problem:
This volume,[33] edited by Jeffrey Lagarias and published by the American Mathematical Society, is a compendium of information on the Collatz conjecture, methods of approaching it and generalizations. It includes two survey papers by the editor and five by other authors, concerning the history of the problem, generalizations, statistical approaches and results from the theory of computation. It also includes reprints of early papers on the subject (including an entry by Lothar Collatz).

## References

1. ^ O'Connor, J.J.; Robertson, E.F. (2006). "Lothar Collatz". St Andrews University School of Mathematics and Statistics, Scotland.
2. ^ Maddux, Cleborne D.; Johnson, D. Lamont (1997). Logo: A Retrospective. New York: Haworth Press. p. 160. ISBN 0-7890-0374-0. The problem is also known by several other names, including: Ulam's conjecture, the Hailstone problem, the Syracuse problem, Kakutani's problem, Hasse's algorithm, and the Collatz problem.
3. Lagarias, Jeffrey C. (1985). "The 3x + 1 problem and its generalizations". The American Mathematical Monthly. 92 (1): 3–23. doi:10.1080/00029890.1985.11971528. JSTOR 2322189.
4. ^ According to Lagarias (1985),[3] p. 4, the name "Syracuse problem" was proposed by Hasse in the 1950s, during a visit to Syracuse University.
5. ^ Pickover, Clifford A. (2001). Wonders of Numbers. Oxford: Oxford University Press. pp. 116–118. ISBN 0-19-513342-0.
6. ^ "Hailstone Number". MathWorld. Wolfram Research.
7. ^ Hofstadter, Douglas R. (1979). Gödel, Escher, Bach. New York: Basic Books. pp. 400–2. ISBN 0-465-02685-0.
8. ^ Guy, Richard K. (2004). ""E17: Permutation Sequences"". Unsolved problems in number theory (3rd ed.). Springer-Verlag. pp. 336–7. ISBN 0-387-20860-7. Zbl 1058.11001.
9. ^ Guy, R. K. (1983). "Don't try to solve these problems". Amer. Math. Monthly. 90 (1): 35–41. doi:10.2307/2975688. JSTOR 2975688. By this Erdos means that there aren't powerful tools for manipulating such objects.
10. ^ Lagarias, Jeffrey C., ed. (2010). The ultimate challenge: the 3x+1 problem. Providence, R.I.: American Mathematical Society. p. 4. ISBN 978-0821849408.
11. ^ Leavens, Gary T.; Vermeulen, Mike (December 1992). "3x+1 Search Programs". Computers & Mathematics with Applications. 24 (11): 79–99. doi:10.1016/0898-1221(92)90034-F.
12. ^ Roosendaal, Eric. "3x+1 Delay Records". Retrieved 30 June 2017. (Note: "Delay records" are total stopping time records.)
13. ^ Eliahou, Shalom (1993-08-01). "The 3x+1 problem: new lower bounds on nontrivial cycle lengths". Discrete Mathematics. 118 (1): 45–56. doi:10.1016/0012-365X(93)90052-U.
14. ^ a b c Simons, J.; de Weger, B. (2003). "Theoretical and computational bounds for m-cycles of the 3n + 1 problem" (PDF). Acta Arithmetica. 117 (1): 51–70. Bibcode:2005AcAri.117...51S. doi:10.4064/aa117-1-3.
15. ^ Steiner, R. P. (1977). "A theorem on the syracuse problem". Proceedings of the 7th Manitoba Conference on Numerical Mathematics. pp. 553–9. MR 0535032.
16. ^ Simons, John L. (2005). "On the nonexistence of 2-cycles for the 3x+1 problem". Math. Comp. 74: 1565–72. Bibcode:2005MaCom..74.1565S. doi:10.1090/s0025-5718-04-01728-4. MR 2137019.
17. ^ Roosendaal, Eric. "On the 3x+1 Problem". Retrieved 6 June 2018.
18. ^ a b c Garner, Lynn E. "On The Collatz 3n + 1 Algorithm" (PDF). Retrieved 27 March 2015.
19. ^ Lagarias (1985),[3] section "A heuristic argument".
20. ^ Krasikov, Ilia; Lagarias, Jeffrey C. (2003). "Bounds for the 3x + 1 problem using difference inequalities". Acta Arithmetica. 109 (3): 237–258. arXiv:math/0205002. doi:10.4064/aa109-3-4. MR 1980260.
21. ^ Colussi, Livio (9 September 2011). "The convergence classes of Collatz function". Theoretical Computer Science. 412 (39): 5409–5419. doi:10.1016/j.tcs.2011.05.056.
22. ^ Hew, Patrick Chisan (7 March 2016). "Working in binary protects the repetends of 1/3h: Comment on Colussi's 'The convergence classes of Collatz function'". Theoretical Computer Science. 618: 135–141. doi:10.1016/j.tcs.2015.12.033.
23. ^ Terras, Riho (1976), "A stopping time problem on the positive integers" (PDF), Acta Arithmetica, 30 (3): 241–252, doi:10.4064/aa-30-3-241-252, MR 0568274
24. ^ Lagarias, Jeffrey (1990). "The set of rational cycles for the 3x+1 problem". Acta Arithmetica. 56 (1): 33–53. doi:10.4064/aa-56-1-33-53. ISSN 0065-1036.
25. ^ Lagarias, Jeffrey C.; Bernstein, Daniel J. (1996). "The 3x + 1 Conjugacy Map". Canadian Journal of Mathematics. 48 (6): 1154–1169. doi:10.4153/CJM-1996-060-x. ISSN 0008-414X.
26. ^ Chamberland, Marc (1996). "A continuous extension of the 3x + 1 problem to the real line". Dynam. Contin. Discrete Impuls Systems. 2 (4): 495–509.
27. ^ Letherman, Simon; Schleicher, Dierk; Wood, Reg (1999). "The (3n + 1)-Problem and Holomorphic Dynamics". Experimental Mathematics. 8 (3): 241–252. doi:10.1080/10586458.1999.10504402.
28. ^ Scollo, Giuseppe (2007), "Looking for Class Records in the 3x+1 Problem by means of the COMETA Grid Infrastructure", Grid Open Days at the University of Palermo (PDF)
29. ^ Lagarias (1985),[3] Theorem D.
30. ^ Conway, John H. (1972), "Unpredictable Iterations", Proc. 1972 Number Theory Conf., Univ. Colorado, Boulder, pp. 49–52
31. ^ Kurtz, Stuart A.; Simon, Janos (2007). "The Undecidability of the Generalized Collatz Problem". In Cai, J.-Y.; Cooper, S. B.; Zhu, H. (eds.). Proceedings of the 4th International Conference on Theory and Applications of Models of Computation, TAMC 2007, held in Shanghai, China in May 2007. pp. 542–553. doi:10.1007/978-3-540-72504-6_49. ISBN 978-3-540-72503-9. As PDF
32. ^ Ben-Amram, Amir M. (2015), "Mortality of iterated piecewise affine functions over the integers: Decidability and complexity", Computability, 1 (1): 19–56, doi:10.3233/COM-150032
33. ^ Lagarias, Jeffrey C., ed. (2010). The Ultimate Challenge: the 3x+1 problem. American Mathematical Society. ISBN 978-0-8218-4940-8. Zbl 1253.11003.