Submitted:
27 January 2023
Posted:
27 January 2023
Read the latest preprint version here
Abstract
The 3x+1 problem asks the following: Suppose we start with a positive integer, and if it is odd then multiply it by 3 and add 1, and if it is even, divide it by 2. Then repeat this process as long as you can. Do you eventually reach the integer 1, no matter what you started with? Collatz conjecture (or 3n+1 problem) has been explored for about 85 years. In this paper, we convert an integer number from decimal to binary number, and convert the Collatz function to binary function, which is multiplication and division of two binary numbers. Finally the iternation of the Collatz function, eventually reach the integer 1, thus we solve the 3x+1 problem completely.
Keywords:
The Collatz conjecture
MSC: 11B25; 11B83; 03D20
1. Introduction
The problem is one of the unsolved problems in mathematics. It is also known as the Collatz conjecture, mapping, Ulam conjecture, Kakutani’s problem, Thwaites conjecture, Hasse’s algorithm, or Syracuse problem [1]. Paul Erdos (1913-1996) commented on the intractability of problem [2]: "Mathematics is not ready for those problems yet".
The problem is that, take any positive integer x, If x is even, divide x by 2. If x is odd, multiply x by 3 and add 1. Repeat this process continuously. The conjecture states that no matter which number you start with, you will always reach 1 eventually.
2. Terminology and notations
We will use the notations as in [4,7]. we describe a Collatz function as
Let N denote the set of positive integers. For , and , and denote n and , respectively. The problem concerns the behavior of the iterates of the Collatz function, for any integer n, there must exist an integer r, so that
2.1. The modified Sarkovskii ordering and integer lattice
We remove the last row number to the first column, get an integer lattice[6] of the modified Sarkovskii ordering as
In the first row, its are odd number from left to right, that are , from the second row, each number is multiplying each number in its previous row by 2, and so on.
2.2. The algebraic formula and Collatz graph
If we draw a line segment of arrow between two digits in the lattice of integer in the modified Sarkovskii ordering, those are the original value x, and its value of Collatz function , and connect to , and so on to , thus we get a graph, which can be called as Collatz graph. For different integer m, n, besides 1, 4, 2, there is not other common vertices in their Collatz graphs. Using the Collatz function , We obtain an algebraic formula of . Here r is the number of perpendicular segments, m is the oblique segments in the Collatz graph,
For example, , , the algebraic formula is
and the Collatz graph is Figure 1.
And , the algebraic formula is
and the Collatz graph is Figure 2.
3. Numerical example
We propose the following algebraic formulas,
4. Convert the integer number from decimal to binary
Be inspired by the above, we use binary to describe the Collatz function (1) an the follows. We denote binary number which is a string of 0s and 1s, is 1 or 0, ,
Namely, when n is odd number, we multipe it with and add 1 to the end of the binary number, we give an example, in Figure 3 in the following. When n is even number, the division is equal to delete zeros at the end in binary number. We give the iteration of the Collatz function for 7, 97 in binary as the following tables.
Example 1.
For 7=(111)2, we calculate the iteration of the Collatz function

Example 2.
For 97=(100100)2, we calculate the iteration of the Collatz function as the following,

We can rewrite the Collatz conjecture in binary as the following, it become an easy problem.
Fact 1
For any positive integer, under the Collatz function, the sequence of integer number in binary eventually must reach the integer 1.
Proof.
For an binary number of odd integer, when we add 1 to the end, and add the shifted binary number one place to the left, finally, the result number must with zeros at the end, we remove this zeros. Thus repeat this process as long as we can, eventually we must reach 1. □
Remark 1.
We can say that problem is an converse proposition of period three implies chaos [4] and an example.
5. Conclusion
In the integer lattice in the modifying the Sarkovskii ordering, denote the composition of the Collatz function as a algebraic formula about the , we give a bridge of algebraic formula with graphs. We completely solve the problem.
References
- Jeffrey C. Lagarias. The 3x + 1 Problem and Its Generalizations. American Mathematical Monthly; Vol. 92, No. 1, pp 3-23.(1985). [CrossRef]
- Jeffrey C. Lagarias. The 3x+1 Problem: An Overview, arXiv:2111.02635.
- Stefan P. A Theorem of Sarkovshii on the existence of periodic orbits of continuous endomorphisms of the real line. Commun. math. Phys. 54,237-248(1977).
- Li, T., Yorke, J. A. Period three implies chaos. Am. Mat. Monthly 82, 985–992 (1975).
- TERENCE TAO, Almost all orbits of the Collatz map attain almost bounded values. arXiv:1909.03562v5, 2022,1,15.
- Jishe FENG, Xiaomeng WANG, Xiaolu GAO, Zhuo PAN. The research and progress of the enumeration of lattice paths. Frontiers of Mathematics in China, 2022, 17(5): 747-766.
- Alf Kimms. The structure of the 3x + 1 problem, Electronic Journal of Graph Theory and Applications, 9(1)(2021),157–174.
Figure 1.
The Collatz graph of in the lattice of integers in the modified Sarkovskii ordering and the algebraic formula.
Figure 1.
The Collatz graph of in the lattice of integers in the modified Sarkovskii ordering and the algebraic formula.

Figure 2.
The Collatz graph of in the lattice of integers in the modified Sarkovskii ordering and the algebraic formula.
Figure 2.
The Collatz graph of in the lattice of integers in the modified Sarkovskii ordering and the algebraic formula.

Figure 3.
For the Collatz function in binary, the first step is the multiplication in left, the second step is division in right bottom.
Figure 3.
For the Collatz function in binary, the first step is the multiplication in left, the second step is division in right bottom.

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.