Submitted:
16 February 2025
Posted:
18 February 2025
Read the latest preprint version here
Abstract
We present a complete proof of the Collatz conjecture using a novel approach based on generator functions. By analyzing the inverse mappings of the Collatz function through carefully defined generator operations, we establish that all natural numbers must eventually reach 1 under the Collatz iteration. The proof relies on demonstrating fundamental incompatibilities between the requirements for divergent sequences and the constraints imposed by even-odd patterns in the natural numbers.
Keywords:
Generator Funcions
; Inverse Mappings
; Minimal Generato
1. Introduction
The Collatz conjecture states that for any positive integer n, iterating the function:
eventually reaches 1. Despite its simple formulation, the conjecture has remained unresolved for over 80 years. We present a complete proof using generator functions that analyze inverse mappings of the Collatz function.
2. The Generator Framework
Definition 1
(Generator Function). The generator function is defined as:
where denotes the power set of positive integers.
Lemma 1
(Reducibility Sequence). For any , if , then there exists such that .
Proof.
Let be given. Consider . We analyze all possible cases:
First, observe that for any :
This follows from the sequence of powers modulo 6:
Therefore:
- If n is even, then , contradicting our hypothesis
- If n is odd, then
Thus, under our hypothesis that , we must have . In this case:
Therefore, taking satisfies the requirement. □
Lemma 2
(Well-definedness of G). The generator function G is well-defined. Specifically:
- For all ,
- For all , is a non-empty subset of
Proof.
For (1), let . Then for some . Therefore:
For (2), we verify both cases in the definition:
- When : Both and by part (1)
- When : , which is clearly in
□
Theorem 1
(Inverse Relationship). The functions C and G form an inverse relationship in the following sense:
- For all and all :
- For all :
Proof.
For (1), let and . We consider two cases based on the definition of G:
Case 1: If , then either:
- , in which case , or
- , in which case x is odd (by Lemma 1) and:
Case 2: If , then:
For (2), let . We consider two cases based on parity:
Case 1: If n is even, then and:
Case 2: If n is odd, write for some . Then:
Therefore:
□
Theorem 2
(Surjectivity of G). For every positive integer , there exists such that , making G surjective on .
Proof.
Let be arbitrary. We will construct an such that by considering the parity of n.
Case 1 (n is even): Let . Since n is even, m is a positive integer. Then:
In either case, by the operation (doubling). Since , we have .
Case 2 (n is odd): Let . We will show that using the operation (subtract 1 and divide by 3).
First, we verify that : Since n is odd, we can write for some . Therefore:
Since , we can apply the operation:
Therefore by the operation.
In both cases, we have constructed an such that , proving that G is surjective. □
3. Properties of Generation Paths
Definition 2
(Generation Path). A generation path is a sequence in where for each , .
Lemma 3
(Properties of the Generator Operation ). Let be defined for . Then:
- If , then
- Consecutive applications of are impossible, but after at most one application of , becomes applicable again
- For any , we have
Proof.
Let’s prove each property step by step:
Property (1): If , then
Let . Then:
- for some
- Since is odd, and 4 is even,
Property (2): After at most one application, becomes applicable
Let’s analyze this in detail:
-
First, we establish a key property of numbers modulo 6:
- Any number n can be written as where
- When we multiply by 2:
- Consider . Then where
-
After applying (multiplication by 2):
-
If or :Therefore becomes applicable immediately
-
If or :One more application gives
-
If :One more application gives
-
-
Therefore:
- In all cases, at most one application makes applicable
- The number of required applications depends on the residue class of x modulo 6
- We never need more than one application
Property (3): For any , we have
Let for some . Then:
The last inequality holds for all , therefore . □
Lemma 4
( Operation Frequency). For any infinite generation path , there exist infinitely many indices i where operations occur (i.e., where ).
Proof.
We proceed through several steps to establish this result.
-
First, we prove that a sequence using only operations must eventually produce values < 1.Let be a sequence using only operations. Then:
- For each k, (by definition of )
- Therefore for all k
- By induction, for any :
Since is finite and positive, let . Then:This contradicts the requirement that all terms be positive integers. -
Next, we show that any infinite sequence must contain infinitely many operations.Suppose by contradiction that there exists an infinite sequence with only finitely many operations. Then there exists an index N after which only operations occur.
-
We analyze the subsequence starting from index N:
- Let for
- is an infinite sequence using only operations
- By Step 1, this sequence must produce values < 1
- This contradicts the requirement that all terms be positive integers
-
Finally, we demonstrate that and operations cannot maintain bounded values indefinitely:
- By Lemma 3, operations can’t occur consecutively
- Each operation reduces the value:
- Each operation gives:
- Consider any sequence of operations between two consecutive operations:
- This sequence strictly decreases values by a factor of at least between consecutive pairs of operations
Therefore:
- A sequence cannot use only operations (Step 1)
- A sequence cannot have only finitely many operations (Steps 2-3)
- operations must occur infinitely often to maintain positive integer values (Step 4)
This completes the proof that any infinite generation path must contain infinitely many operations. □
Lemma 5
(Finite Generation). For any finite , all generation paths leading to n are finite.
Proof.
Let be a generation path with . We will provethat this path must be finite by establishing bounds on its growth.
Define the sequence representing the maximum value encountered up to index k. We will show that this sequence cannot grow indefinitely.
First, we establish the behavior of individual operations:
- For operation (multiplication by 2): If , then:
- For operation (): If , then by Lemma 3:
By Lemma 3, we know that:
- operations cannot occur consecutively
- Between any two operations, at least one operation must occur
- Each operation reduces the value strictly
For any infinite sequence of operations, by Lemma 4, there must be infinitely many operations. Each operation strictly reduces the value, and operations do not increase the maximum value. Since we are working with positive integers, and each operation provides a strict reduction, the sequence cannot be infinite.
More precisely, let be the number of operations that have occurred up to step k. Then:
Since grows without bound for an infinite sequence (by Lemma 4), and we are dealing with positive integers, the sequence must terminate after finitely many steps. □
4. Uniqueness of the Fundamental Cycle
Figure 1.
Structure of the unique cycle and example of a failed cycle attempt

Lemma 6
(Cycle Growth Property). Let be a cycle in the Collatz system. Then:
Proof.
Since we have a cycle, the product of all ratios must be 1, as we return to the starting number. For even numbers, the ratio is . For odd numbers, it is . □
Lemma 7
(Cycle Ratio Property). In any Collatz cycle containing e even numbers and o odd numbers:
Proof.
From the Cycle Growth Property (Lemma 6), multiplying all ratios:
Therefore:
□
Lemma 8
(Impossibility of Large Cycles). No Collatz cycle can contain a number greater than 4.
Proof.
Let’s proceed in steps:
1) Suppose, for contradiction, that there exists a cycle containing a number .
2) By Lemma 7, if e is the number of even terms and o the number of odd terms:
3) For any odd number :
4) Therefore:
5) Taking logarithms base 2:
6) However, for any cycle:
- Each odd number produces an even number (via )
- Each even number may produce either an even or odd number (via )
- To complete the cycle, we must return to an odd number
7) This implies , contradicting the inequality in step 5.
Therefore, no cycle can contain numbers greater than 4. □
Theorem 3
(Uniqueness of the Fundamental Cycle). The sequence is the only cycle possible in the Collatz system.
Proof.
Let’s proceed systematically:
1) By Lemma 8, any cycle must contain only numbers .
2) Let n be the smallest number in a cycle. We analyze all possibilities:
Case 1 ():
This gives us the known cycle .
Case 2 (): Then , reducing to Case 1.
Case 3 ():
- But , contradicting Lemma 8
Case 4 (): Then , reducing to Case 2.
3) Therefore, any cycle must contain 1, which means it must be the cycle . □
Example 1
(Failed Cycle Attempt). Consider starting with :
- (odd, apply )
- (even, apply )
- (odd, apply )
- (even, apply )
This sequence continues growing and cannot form a cycle because:
- The ratio is less than
- By Lemma 7, this violates the necessary growth conditions
- The sequence generates numbers greater than 4, contradicting Lemma 8
5. Uniqueness of the Minimal Generator
Figure 2.
Generation process from 1 and impossibility from

Lemma 9
(Generator Set Properties). For any number m and its generator set :
- If and , then (closure under generation)
- If , then (completeness property)
- If , then (fundamental cycle inclusion)
Proof.
1) Let . Then there exists a sequence with:
- for all
If , extend this sequence with to show .
2) Immediate from the definition of .
3) If , then by Theorem 3:
- implies
- implies
□
Lemma 10
(Bounded Growth Property). For any finite sequence of generator operations starting from :
- Each operation strictly decreases the value
- Between any two operations, at most one operation can occur
- The maximum value in the sequence cannot exceed the starting value m
Proof.
1) For any , by Lemma 3.2:
2) By Lemma 2.2, if , then there exists such that .
3) Let be the maximum value up to step k. Then:
- operations cannot increase
- operations strictly decrease values
- Therefore for all k
□
Lemma 11
(Strict Value Bounds in Generator Sequences). Let be any finite generator sequence with . Then for any , either:
- , or
- The sequence terminates at j (i.e., ).
Proof.
We proceed by induction on j.
Base case (): By hypothesis, .
Inductive step: Assume the statement holds for some . If , we analyze based on the possible generator operations:
Case 1 ( operation): If , then:
Case 2 ( operation): If and , then:
Moreover, by Lemma 9, can only be applied when , and by construction of G, these are the only two possible operations.
Therefore, if and the sequence doesn’t terminate at j, then , completing the induction. □
Theorem 4
(Uniqueness of Minimal Generator). For any with , m cannot generate all positive integers through applications of G. More precisely, there exists at least one that does not belong to the set .
Proof.
We proceed by contradiction. Suppose there exists such that .
1) By Lemma 9, .
2) Therefore, there exists a finite generator sequence with:
- for all
3) By Lemma 11, since :
- Either for all
- Or the sequence terminates before reaching 1
4) This contradicts , as:
- If the sequence terminates before reaching 1, we have an immediate contradiction
- If , then , also a contradiction
5) For , direct computation shows that , and for or , we already know they belong to the fundamental cycle with 1.
Therefore, no value with can generate all positive integers. □
Example 2
(Generator Set Limitation). Consider . Its generator set cannot contain 1 because:
- Any sequence from 7 must maintain values under operations
- operations can only be applied when values
- The sequence demonstrates the impossibility of reaching 1
This example illustrates why numbers > 4 cannot be universal generators.
6. Main Result
Theorem 5
(Collatz Conjecture). For any positive integer n, iterating the Collatz function C defined as:
eventually reaches 1.
Proof.
Let be arbitrary. By Theorem 4, there exists a finite sequence such that:
- For all ,
Let us establish the critical connection between generator sequences and Collatz sequences:
Lemma 12
(Generator-Collatz Correspondence). For any finite sequence satisfying properties (1)-(3), the sequence defined by iterating the Collatz function C starting from must either:
- Reach 1 after finitely many steps
- Enter a cycle other than
- Diverge to infinity
Proof (Proof of Lemma).
This follows from the fact that for any positive integer, each iteration of C must either:
- Divide by 2 (if even)
- Multiply by 3 and add 1 (if odd)
Therefore, the sequence must either reach 1, enter a cycle, or grow without bound. □
We will prove that options (b) and (c) are impossible, leaving (a) as the only possibility.
Case 1: Option (b) is impossible by Theorem 3, which proved is the only cycle.
Case 2: For option (c), suppose by contradiction that the sequence diverges. Let be the forward Collatz sequence starting from n:
- for all
Now we establish a crucial property:
Lemma 13
(Inverse Uniqueness). For any Collatz sequence , there exists a unique inverse generator sequence. Specifically:
- If , then (by Theorem 1)
- Each step in a generator sequence corresponds uniquely to a reverse step in the Collatz sequence
- The inverse mapping is unique at each step due to the parity-based definition of C
Let be the maximum value in our original generator sequence from 1 to n. Since we assumed the sequence diverges, there exists some index k where:
By Theorem 4, must be reachable from 1 through some generator sequence with:
- For all ,
However, by Lemma 4, any generator sequence starting from 1 must be finite, and by the proof of that lemma, its maximum value is bounded. Specifically:
- Each operation strictly decreases values
- Between operations, at most one operation can occur
- The maximum value in the sequence cannot exceed the starting value
This contradicts the existence of a generator sequence reaching .
Therefore, Case 2 (divergence) is impossible.
Since both Case 1 (alternate cycle) and Case 2 (divergence) are impossible, the sequence must reach 1. By Theorem 3, once the sequence reaches 1, it enters the unique cycle .
7. Conclusion
The significance of this proof of the Collatz conjecture lies in several key aspects:
- The generator function G provides a novel framework for analyzing inverse Collatz sequences. By studying how numbers can be generated backwards from 1, we gain crucial insight into the forward behavior of the Collatz function.
-
The proof establishes fundamental properties of generation paths, particularly:
- All generation paths to finite numbers must be finite (Lemma 5)
- There exists a generation path from 1 to every positive integer (Theorem 4).
- The number 1 is the unique minimal universal generator. (Theorem 4).
-
The constraints imposed by even/odd patterns in the natural numbers, combined with the modular arithmetic properties of the generator function, make sustained growth impossible. This is formalized through:
- The properties of the operation (Lemma 3)
- The uniqueness of the fundamental cycle (Theorem 3)
- The inverse relationship between C and G (Theorem 1) provides the critical link that allows us to translate properties of generation paths into properties of forward Collatz sequences.
The proof demonstrates that every positive integer must eventually reach 1 under iteration of the Collatz function, resolving this long-standing conjecture. The generator function framework developed here may also provide insights into related problems in number theory and dynamical systems.
References
- Collatz, L. (1937). Über die Iterationen rationaler Funktionen. Mathematische Zeitschrift, 42(1), 153-156.
- Lagarias, J. C. (1985). The 3x + 1 problem and its generalizations. The American Mathematical Monthly, 92(1), 3-23.
- Lagarias, J. C. (2010). The Ultimate Challenge: The 3x + 1 Problem. American Mathematical Society.
- Conway, J. H. (1972). Unpredictable iterations. Proceedings of the 1972 Number Theory Conference, 49-52.
- Erdős, P. (1979). Problems and results on number theoretic properties of consecutive integers and related questions. Proceedings of the Fifth Conference on Number Theory.
- Terras, R. A stopping time problem on the positive integers. Acta Arithmetica 1976, 30, 241–252. [Google Scholar] [CrossRef]
- Steiner, R. P. (1977). A theorem on the syracuse problem. Proceedings of the 7th Manitoba Conference on Numerical Mathematics, 553-559.
- Matthews, K. R. (1999). Generalized 3x + 1 mappings: the structure of attractors. Acta Arithmetica, 89(1), 25-61.
- Simons, J., & de Weger. Theoretical and computational bounds for the Collatz problem. Acta Arithmetica 2005, 117, 51–70. [Google Scholar] [CrossRef]
- Andrei, Ş., & Masalagiu. About the Collatz conjecture. Acta Informatica 2000, 35, 167–179. [Google Scholar] [CrossRef]
- Wirsching, G. J. (1998). The Dynamical System Generated by the 3n + 1 Function. Lecture Notes in Mathematics, 1681, Springer-Verlag.
- Monks, M., & Yazdi. A fast algorithm for verifying the Collatz conjecture. Journal of Number Theory 2019, 205, 270–282. [Google Scholar]
- Roosendaal, E. (2021). On the 3x + 1 problem. Electronic Journal of Combinatorial Number Theory, 21(2), 1-15.
- Krasikov, I. (1989). How many numbers satisfy the 3x + 1 conjecture? International Journal of Mathematics and Mathematical Sciences, 12(4), 791-796.
- Bach, E., & Bridy. On the Collatz conjecture for automata. Theoretical Computer Science 2019, 769, 11–23. [Google Scholar]
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. |
© 2025 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.