Solving the Collatz Conjecture, Using Gaussian Arithmetic

Abstract

We prove that the Collatz, 3n+1 , conjecture is true. To prove this statement, we will first see that, if a number n starts a sequence that satisfies the Collatz conjecture then all sequences containing that number n satisfy the conjecture. We will call these sequences Collatz trajectories. Then, we will study trajectories over equivalence classes defined by the congruences modulo 6, which were already discussed by Carl F. Gauss in 1798, and we will show that all Collatz trajectories contain some number belonging to the class [ 4 ] 6 . Finally, we will prove that all numbers belonging to class [ 4 ] 6 initiate trajectories that satisfy the conjecture. All this proves the first statement: The Collatz conjecture is true.

Share and Cite:

Diarte-Carot, E. (2025) Solving the Collatz Conjecture, Using Gaussian Arithmetic. Journal of Applied Mathematics and Physics, 13, 1960-1968. doi: 10.4236/jamp.2025.135109.

1. Introduction

In 1937 the German mathematician Lothar Collatz considered, for the set of positive integers N , the function C:NN defined by

C( k ):={ 3k+1 ifkodd, k 2 ifkeven.

Collatz conjectured that, for any starting point kN , the sequence obtained by successive applications of the function C would eventually arrive at 1 (so that the cycle 4, 2,1 is repeated indefinitely).

Numerical computation was used to prove that all numbers equal to or less than 2.95147⋅1020 satisfy the Collatz conjecture; see [1]. The limits of the orbits have been studied in detail; see [2] [3].

A reduced conjecture, equivalent to the Collatz conjecture, has been proposed; see [4].

Finally, empirical-heuristic approaches to prove the conjecture have also been carried out using appropriate algorithms; see [5] and [6].

For a historical view of the study of the Collatz conjecture; see [7] and [8].

This approach to the Collatz conjecture is based on mathematics from the early nineteenth century. More specifically, we use the “number congruences in general” that were discussed by Carl F. Gauss already in 1798 and published in 1801, in chapter 1 of his Disquisitiones Arithmeticae [9].

The paper is organized as follows. In Section 2 we use residue classes modulo 6 to study the iterations of C . Using these tools, in Section 3 we prove the Collatz conjecture.

Notation

1) : the set of integers.

2) ={ k|k,k>0 } : the set of natural numbers.

3) 0 ={ k|k,k0 } : the set including cero.

4) [ k r ] 6 ={ n|n k r mod.6,n },0 k r <6 , and also.

5) [ k r ] 6 ={ n|n=6k+ k r ,k 0 },0 k r <6 .

2. Trajectories, Transitions, Loops and Modular Arithmetic

The problem in proving Collatz’ conjecture is that the number of trajectories is equal to the cardinality of , which is infinite, | |= .

To analyze and solve the problem without losing generality and completeness, we will use the congruences of natural numbers, modulo 6.

In this section, let’s see the basic elements, trajectory, transition, and loop, as well as the concept and properties of the congruences that we will use in the proof.

For kN , the Trajectory of k is the sequence obtained by successively applying the function C to k . We will denote it by T( k ) . Hence,

T( k ):= { C n ( k ) } n=0 ,where C n ( k ):={ k ifn=0, CCC ntimes ( k ) forn1.

Then, kN satisfies the Collatz conjecture whenever 1T( k ) .

As an example of a trajectory, here is the trajectory that begins with number 72.

T( 72 )={ 72,36,18,9,28,14,7,22,11,34,17,52,26,13,40,20,10,5,16,8,4,2,1, }

The process is simple:

72 is even, so we divide by 2 to get 36; 36 is even, so we divide by 2 to get 18; 18 is even, so we divide by 2 to get 9; 9 is odd, so we multiply by 3 and add 1 to get 28; 28 is even, so we divide by 2 to get 14; 14 is even, then we divide by 2 to get 7; 7 is odd, then we multiply by 3 and add 1 to get 22, and so on.

As we can see, the trajectory is a sequence of numbers, apparently without any recognizable pattern, except that each number is followed by another, which is always the same, since the Collatz function is linear and that, by the definition of the function, every odd number is always followed by an even number.

However, if we use congruences of natural numbers, the view of the structure of the trajectory changes completely. Patterns appear, which will allow us to tackle and complete the proof of the conjecture.

So, we will now discuss congruences of natural numbers modulo 6, the concept and the properties that are relevant for the proof.

Remark 1. Congruences of natural numbers modulo 6:

1) General definition of congruences, modulo k : m is congruent to r , modulo k , ( mr ), if mr=kn , with k,n .

2) The choice of k=6 meets the following three criteria:

a) Keep odd and even numbers in separate sets, as the definition of the conjecture does ( k=5 does not).

b) Contain, as representatives of the residue classes, the numbers 4, 2, and 1, which form the final loop of the conjecture.

c) Facilitate the analysis necessary to find a set such that all trajectories contain at least one number belonging to that set. As we will see later, this will be one of the key points in proving the conjecture.

3) In the following points, we will use module 6. Thus, if we rewrite, mr=6n as m=6n+r , with n , we can restate the congruence of natural numbers modulo 6 as follows: m is congruent to r , modulo 6, ( mr ), if r is the remainder when m is divided by 6.

4) An equality relation between remainders satisfies the reflexive, symmetric, and transitive properties, so, by definition, it is an equivalence relation.

5) The remainders of dividing any natural number by 6 are { 0,1,2,3,4and5 } . These numbers will be the representatives of the equivalence classes, also called residue classes. See notation 4.

6) The residue classes are well defined by the arithmetic progressions of difference 6: [ r ] 6 =6k+r , with k 0 . See notation 5.

7) Since, this is an equivalence relation, the 6 residue classes form a partition of which is exhaustive, i.e. every n belongs to one of the classes. In other words, every natural number has a remainder when divided by 6, so, every natural number belongs to one of the residue classes.

8) The general terms of these progressions, whatever the value of n and r , are natural numbers and, therefore, the Collatz function can be applied. In this sense, we can say that this function is applicable to residue classes: C( 6k+r )=C( [ r ] 6 ) . This allows us to define the transition between residue classes and describe a trajectory as a series of linked transitions.

A Transition, denoted by,

[ k 1 ] 6 [ k 2 ] 6 ,0 k 1 , k 2 <6,

corresponds to the Collatz Function, which maps the residue class [ k 1 ] 6 into the residue class [ k 2 ] 6 , that is, if n [ k 1 ] 6 then C( n ) [ k 2 ] 6 .

The evolution of the trajectory, T( 72 ) from the example above, as a sequence of transitions between residue classes, completely changes the view of the structure, since:

Dividing 72 by 6 we get remainder 0, so dividing 36 by 6 we get remainder 0, so dividing 18 by 6 we get remainder 0, so dividing 9 by 6 we get remainder 3, so dividing 28 by 6 we get remainder 4, so dividing 14 by 6 we get remainder 2, so dividing 7 by 6 we get remainder 1, so dividing 22 by 6 we get remainder 4, so dividing 11 by 6 we get remainder 5, so dividing 34 by 6 we get remainder 4, so dividing 17 by 6 we get remainder 5, so dividing 52 by 6 we get remainder 4, and so on.

Then,

T( 72 )={ 0,0,0,3,4,2,1,4,5,4,5,4,2,1,4,2,4,5,4,2,4,2,1, }

Now, we can see the following patterns:

a) The transitions of the even classes are: 00 or 03 ; 21 or 24 and 42 or 45 .

b) The transitions of the odd classes are: 14 ; 34 and 54 .

In Section 3, we will generalize these results to all possible trajectories, and we will see that, in any trajectory, there are only a maximum of 9 types of transitions, which we have just seen in T( 72 ) . For this reason, it is important that we work with congruences, Module 6, since:

1) We can draw a directed graph of these transitions, and

2) We reduce the study of infinite trajectories to a continuous movement in that graph.

3) Furthermore, it is shown that all trajectories, regardless of where they start, eventually reach residue class 4.

A Loop, is a concatenation of transitions, which ends when the initial residue class reappears in the concatenation.

The directed graph in Section 3 shows four loops:

00;424;4214and454.

Applying of proof by contradiction to loops 424 and 4214 , and the principle of mathematical induction to loop 454 ; we will complete the proof.

3. Proof of the Collatz Conjecture

Proposition 1. Let be nT( k ) , and let T( n ) be the trajectory starting from n , if T( n ) satisfies the conjecture, then so does T( k ) .

Proof. By the definition of trajectory, if nT( k ) ,   i such that C i ( k )=n and, from n , it follows that C i+1 ( k )=C( n ) and C i+2 ( k )= C 2 ( n ) and C i+3 ( k )= C 3 ( n ) and so on.

Then, from n , T( k ) and T( n ) are equal. Thus, if T( n ) satisfies the conjecture, then 1T( n ) and also 1T( k ) . Therefore T( k ) also satisfies the conjecture. □

Remark 2. According to this proposition 1 the steps to prove the conjecture are as follows:

1) Find a set SN , well defined, such that all T( k ) contain some number nS .

2) Prove that every T( n ) , with nS , satisfies the Collatz conjecture.

If we get these points, proposition 1 will complete the proof of the conjecture.

Proposition 2. All trajectories T( k ) contain numbers n belonging to the residue class [ 4 ] 6 , independent of the starting number, since the following holds.

1) [ 0 ] 6 [ 0 ] 6 [ 3 ] 6 .

2) [ 1 ] 6 [ 4 ] 6 .

3) [ 2 ] 6 [ 1 ] 6 [ 4 ] 6 .

4) [ 3 ] 6 [ 4 ] 6 .

5) [ 4 ] 6 [ 2 ] 6 [ 5 ] 6 .

6) [ 5 ] 6 [ 4 ] 6 .

Proof. According to notation 4, the residue classes, modulo 6, are as follows: [ 0 ] 6 , [ 1 ] 6 , [ 2 ] 6 , [ 3 ] 6 , [ 4 ] 6 , [ 5 ] 6 .

Now we calculate the transition of each residue class by applying the Colaltz function to the corresponding general terms, see notation 5.

1) We have C( 6k )= 6k/2 =3k . Then, there are two alternatives:

a) k is even, then k=2 k 1 and so, C( 6k )=3×2 k 1 =6 k 1 [ 0 ] 6 .

b) k is odd, then k=2 k 1 +1 and so, C( 6k )=3×( 2 k 1 +1 )=6 k 1 +3 [ 3 ] 6 .

2) We have C( 6k+1 )=3×( 6k+1 )+1=18k+4 [ 4 ] 6 .

3) We have C( 6k+2 )= ( 6k+2 )/2 =3k+1 . Then, there are two alternatives:

a) k is even, then k=2 k 1 and so, C( 6k+2 )=3×2 k 1 +1=6 k 1 +1 [ 1 ] 6 .

b) k is odd, then k=2 k 1 +1 and so C( 6k+2 )=3×( 2 k 1 +1 )+1=6 k 1 +4 [ 4 ] 6 .

4) We have C( 6k+3 )=3×( 6k+3 )+1=19k+4 [ 4 ] 6 .

5) We have C( 6k+4 )= ( 6k+4 )/2 =3k+2 Then, there are two alternatives:

a) k is even, then k=2 k 1 and so, C( 6k+4 )=3×2 k 1 +2=6 k 1 +2 [ 2 ] 6 .

b) k is odd, then k=2 k 1 +1 and so, C( 6k+4 )=3×( 2 k 1 +1 )+2=6 k 1 +5 [ 5 ] 6 .

6) We have C( 6k+5 )=3×( 6k+5 )+1=20k+4 [ 4 ] 6 .

These results can be plotted on an oriented graph.

Note that, the loop [ 0 ] 6 [ 0 ] 6 is finite, since every k [ 0 ] 6 can be factored as k= 2 m × 3 r ×( odd number ) and is not repeated after m repetitions.

So, all trajectories T( k ) contain numbers n belonging to the residue class [ 4 ] 6 , independent of the starting number. □

In the following propositions 3 and 4 we will answer remark 2 (ii).

The oriented graph of proposition 2 also shows that, all T( n ) , where n [ 4 ] 6 , always start with one of the following sequences of terms,

either n, n 2 , n 4 , or n, n 2 , n 4 ,3 n 4 +1, or n,3n+1, 3n+1 2 ,

corresponding to the loops,

either [ 4 ] 6 [ 2 ] 6 [ 4 ] 6 or [ 4 ] 6 [ 2 ] 6 [ 1 ] 6 [ 4 ] 6 or [ 4 ] 6 [ 5 ] 6 [ 4 ] 6 .

Proposition 3. A trajectory T( n ) , where n [ 4 ] 6 , starting with loops either [ 4 ] 6 [ 2 ] 6 [ 4 ] 6 or [ 4 ] 6 [ 2 ] 6 [ 1 ] 6 [ 4 ] 6 satisfies the Collatz conjecture.

Proof. Suppose, by way of contradiction, that n is the smallest term, belonging to [ 4 ] 6 , that starts a trajectory, T( n ) , that does not satisfy the Collatz conjecture and, moreover, begins with the loop [ 4 ] 6 [ 2 ] 6 [ 4 ] 6 . That is, the sequence of terms

n, n 2 , n 4 ,

and n>4 .

Note that under this assumption no term in T( n ) satisfies the Collatz conjecture. But,

n 4 [ 4 ] 6 and n 4 <n.

However, this contradicts the assumption that n is the smallest term that starts a trajectory T( n ) , which does not satisfy the Collatz conjecture. Therefore, T( n ) satisfies the Collatz Conjecture.

Consider a similar situation, T( n ) does not satisfy the Collatz conjecture but, now, starts with the loop [ 4 ] 6 [ 2 ] 6 [ 1 ] 6 [ 4 ] 6 . That is, it starts with the sequence of terms

n, n 2 , n 4 ,3 n 4 +1,

and n>4 .

Then,

3 n 4 +1 [ 4 ] 6 and3 n 4 +1<n.

This also contradicts the assumption of n is the smallest term that starts a trajectory T( n ) , which does not satisfy the Collatz conjecture. Therefore, T( n ) satisfies the Collatz Conjecture. □

Corollary 1. A trajectory containing terms from the residue class [ 2 ] 6 satisfies the Collatz conjecture.

Proof. Numbers in the residue class [ 2 ] 6 are necessarily and exclusively part of the loops either [ 4 ] 6 [ 2 ] 6 [ 1 ] 6 [ 4 ] 6 or [ 4 ] 6 [ 2 ] 6 [ 4 ] 6 , and any trajectory which contains any of these loops and, thus numbers of class [ 2 ] 6 , satisfies the Collatz conjecture by Proposition 3. □

We now consider T( n ) , where n [ 4 ] 6 , stating with the loop [ 4 ] 6 [ 5 ] 6 [ 4 ] 6 .

Proposition 4. A trajectory T( n ) , where n [ 4 ] 6 , starting with the loop [ 4 ] 6 [ 5 ] 6 [ 4 ] 6 cannot repeat it an infinite number of times in a row and, therefore, it satisfies the Conjecture.

Proof. Consider a trajectory of the form T( n 1 )={ n 1 , m 1 , n 2 , m 2 , } , for n i [ 4 ] 6 and m i [ 5 ] 6 , for all i1 .

Then, we take the first three elements of the trajectory T( n 1 )

( n 1 , m 1 , n 2 )=( 6 k 0 +4, 6 k 0 +4 2 ,3 6 k 0 +4 2 +1 )=( 6 k 0 +4,6 k 1 +5,6( 3 k 1 +2 )+4 ),

for k 0 =2 k 1 +1 .

The second three elements of the trajectory T( n 1 )

( n 2 , m 2 , n 3 )=( 6( 3 k 1 +2 )+4,6( 3 k 2 +2 )+5,6( 3 2 k 2 +8 )+4 ),

for k 1 =2 k 2 +1 ; k 0 =2( 2 k 2 +1 )+1= 2 2 k 2 +2+1 .

The third three elements of the trajectory T( n 1 )

( n 3 , m 3 , n 4 )=( 6( 3 2 k 2 +8 )+4,6( 3 2 k 3 +8 )+5,6( 3 3 k 3 +26 )+4 ),

for k 2 =2 k 3 +1 ; k 0 = 2 2 ( 2 k 3 +1 )+3= 2 3 k 3 + 2 2 +2+1 .

In the general case, we have

( n i , m i , n i+1 )=( 6( 3 i1 k i1 + 3 i1 1 )+4,6( 3 i1 k i + 3 i1 1 )+5,6( 3 i k i + 3 i 1 )+4 ),

for k i1 =2 k i +1 and k 0 = 2 i k i + s=0 i1 2 s = 2 i ( k i +1 )1 .

Since, .

The induction is completed by applying the Collatz function to ( n i , m i , n i+1 ) to compute ( n i+1 , m i+1 , n i+2 ) , thus we get the following result, which corresponds to the general formula:

( n i+1 , m i+1 , n i+2 )=( 6( 3 i k i + 3 i 1 )+4,6( 3 i k i+1 + 3 i 1 )+5,6( 3 i+1 k i+1 + 3 i+1 1 )+4 ),

for k i =2 k i+1 +1 and k 0 = 2 i+1 ( k i+1 +1 )1 .

These above computations establish that, if i , then there is no possible choice for k 0 . So, n 1 =6 k 0 .

Anyway, ( k 0 , k 1 , k 2 ,, k i ,,1 ) is a strictly decreasing sequence of odd natural numbers with a minimum at 1, therefore, if k 0 , then it is a finite sequence and loop [ 4 ] 6 [ 5 ] 6 [ 4 ] 6 stops.

When the loop stops, instead of repeating the class [ 5 ] 6 , an element of the class [ 2 ] 6 appears and, by Corollary 1, T( n ) satisfies the Conjecture. □

Theorem 1. The Collatz conjecture is true.

Proof. Let k and consider T( k ) .

Proposition 1 shows that if nT( k ) and T( n ) satisfies the conjecture so does T( k ) .

Proposition 2 shows that, all trajectories T( k ) contain numbers n [ 4 ] 6 .

Proposition 3 shows that, T( n ) , starting with either loop [ 4 ] 6 [ 2 ] 6 [ 4 ] 6 or [ 4 ] 6 [ 2 ] 6 [ 1 ] 6 [ 4 ] 6 satisfies the Collatz conjecture. Then T( k ) also satisfies it as well.

Proposition 4 shows that a trajectory T( n ) , starting with loop [ 4 ] 6 [ 5 ] 6 [ 4 ] 6 , cannot repeat it an infinite number of times in a row and satisfies the Conjecture.

To summarize: By Propositions 3 and 4 all trajectories T( n ) , beginning with numbers n [ 4 ] 6 satisfy the Collatz conjecture and Propositions 2 and 1 extend this result to all trajectories T( k ) , then the Collatz conjecture is true. □

Acknowledgements

First, I thank God. He has given me a family that always supports my little occurrences like this paper. My wife, Marisa; my son Emilio, who has reviewed this article, and my daughter Pilar; their respective spouses, Michelle and Carlos; my grandson Gabriel, Carlos, Pablo and Pilar.

A very special thank you to Ramón Carbó-Dorca, Institute of Computational Chemistry and Catalysis, Universitat de Girona, Girona, Spain and Ronin Institute for Independent Research/Sacramento, California, USA, for their reviews and valuable comments on this paper.

Conflicts of Interest

The author declares no conflicts of interest regarding the publication of this paper.

References

[1] Barina, D. (2020) Convergence Verification of the Collatz Problem. The Journal of Supercomputing, 77, 2681-2688.
https://doi.org/10.1007/s11227-020-03368-x
[2] Krasikov, I. and Lagarias, J.C. (2003) Bounds for the 3x + 1 Problem Using Difference Inequalities. Acta Arithmetica, 109, 237-258.
https://doi.org/10.4064/aa109-3-4
[3] Tao, T. (2022) Almost All Orbits of the Collatz Map Attain Almost Bounded Values. Forum of Mathematics, Pi, 10, e12.
https://doi.org/10.1017/fmp.2022.8
[4] Ren, W. (2019) A New Approach on Proving Collatz Conjecture. Journal of Mathematics, 2019, Article ID: 6129836.
https://doi.org/10.1155/2019/6129836
[5] Carbó Dorca, R. (2020) Boolean Hypercubes, Mersenne Numbers, and the Collatz Conjecture. Journal of Mathematical Sciences and Modelling, 3, 120-129.
https://doi.org/10.33187/jmsm.776898
[6] Carbó-Dorca, R. (2023) Collatz Conjecture Redefinition on Prime Numbers. Journal of Applied Mathematics and Physics, 11, 147-157.
https://doi.org/10.4236/jamp.2023.111011
[7] Lagarias, J.C. (1985) The 3x + 1 Problem and Its Generalizations. The American Mathematical Monthly, 92, 3-23.
https://doi.org/10.1080/00029890.1985.11971528
[8] Chamberland, M. (2010) A Survey: Number Theory and Dynamical Systems. In: Lagarias, J.C., Ed., The Ultimate Challenge the Problem, American Mathematical Society, 57-78.
[9] Gauss, C.F. (1965) Disquisitiones Arithmeticae. Yale University Press.

Copyright © 2025 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.