Preprint
Article

This version is not peer-reviewed.

Collatz Conjecture, Cycles, the 4n – 2 Series, and Positions Within the Series

Submitted:

04 March 2025

Posted:

07 March 2025

You are already at the latest version

Abstract
We demonstrate that the Collatz conjecture generates cycles that consistently converge to the series defined by (4n - 2), ultimately terminating at the number 2. We propose an innovative algorithm that predicts the positions within this series during each cycle. Through a rigorously defined metric, we establish that these positions invariably converge to position 1, corresponding to the number 2 in the Collatz sequence (2 to 1 to 4 to 2). This approach not only confirms the validity of the conjecture for all positive integers but also provides a novel framework for understanding its cyclic behavior.
Keywords: 
;  ;  

1. Introduction

Formulated by Lothar Collatz in 1937 [1], the Collatz conjecture asserts that, for any positive integer n, the iterative application of the function:
f ( n ) = n 2 if n is even , 3 n + 1 if n is odd ,
eventually leads to the number 1, entering the cycle 1 4 2 1 . Despite extensive study [2, 3], it remains one of the most intriguing unsolved problems in number theory.
In this paper, we approach the conjecture from an original perspective: we show that the generated sequences cycle through numbers in the series 4 n 2 , converging to 2. We define an algorithm to track positional transitions within this series and employ a metric to prove convergence to position 1, thus demonstrating the conjecture. Our methodology combines analytical rigor and computational support, offering new insights into this classic problem.

2. Preliminary Results

We establish the fundamental properties underpinning our analysis.

2.1. Properties of Odd Numbers

Lemma 1. 
The product of two odd numbers is odd.
Proof. 
Let a = 2 k + 1 and b = 2 m + 1 be two odd integers, with k , m Z . Their product is:
a · b = ( 2 k + 1 ) ( 2 m + 1 ) = 4 k m + 2 k + 2 m + 1 = 2 ( 2 k m + k + m ) + 1 ,
an odd number. In particular, since 3 = 2 · 1 + 1 is odd, if n is odd, then 3 n is also odd.    □
Lemma 2. 
Any odd number plus 1 is even.
Proof. 
Let a = 2 k + 1 be an odd number, with k Z . Then:
a + 1 = 2 k + 1 + 1 = 2 ( k + 1 ) ,
which is even. Therefore, if n is odd, 3 n + 1 is even.    □

2.2. Partition of Even Numbers

We define the set of positive even integers as E = { 2 , 4 , 6 , 8 , } . We divide it into:
  • Subset A: A = { 4 n 2 n = 1 , 2 , 3 , } = { 2 , 6 , 10 , 14 , 18 , } ,
  • Subset B: B = { 4 m m = 1 , 2 , 3 , } = { 4 , 8 , 12 , 16 , 20 , } .
Each subset represents 50% of E, alternating in the sequence of even numbers.

2.3. Relationship Between Subsets

Lemma 3. 
Every number in B can be expressed as 2 k · a , where a A and k 1 .
Proof. 
Let b = 4 m B . Then b = 2 2 · m . If m = 2 l · q with q odd, we have:
b = 2 2 + l · q .
Dividing by 2 2 + l times yields q. Then 3 q + 1 is even, and after further divisions, we reach a number in A. Example: 96 = 6 · 2 4 , 6 A .    □

3. Cyclic Behavior and the 4 n 2 Series

3.1. Transition to Even Numbers

By Lemmas 1 and 2, 3 n + 1 transforms any odd n into an even number, initiating divisions by 2.

3.2. Convergence to the 4 n 2 Series

An even number in B, such as 2 k · a , reduces to a A after divisions. From a A , a division leads to an odd number, restarting the cycle. All sequences terminate at 2 A .

4. Positional Analysis within the 4 n 2 Series

We define the position of a number s A as:
Position = s + 2 4 ,
where s = 4 n 2 . For s = 2 , the position is 1. Our goal is to demonstrate that Collatz cycles converge to this position.

5. Positional Transition Algorithm

We propose an algorithm to predict the next position after each cycle in the 4 n 2 series:
  • Step 1: Multiply the current position by 1.5. If the result is an integer, this is the new position.
  • Step 2: If it is not an integer, add 0.5 and divide by 2, repeating until an integer is obtained.
Mathematically, the algorithm is expressed as an iterative function g ( p k ) , where p k is the position at step k:
g ( p k ) = 3 2 p k if 3 2 p k Z , nearest integer after iterating x + 0.5 2 from x 0 = 3 2 p k if 3 2 p k Z ,
where the iteration x i + 1 = x i + 0.5 2 is applied until x m Z , and then g ( p k ) = x m .

6. Demonstration of the Convergence of the Positional Algorithm

6.1. Definition of the Convergence Metric

To prove that the positional algorithm converges to 1 from any initial position p 0 Z 1 , we define the metric, building on computational approaches to iterative sequences [4, 5]:
h ( p k ) = p k · 2 k ,
where p k is the k-th position in the sequence generated by g, and k is the step index (starting at k = 0 for p 0 ). Convergence to 1 is verified if h ( p k ) strictly decreases at each step and the sequence terminates at p t = 1 .

6.2. Fundamental Property of Decrease

We demonstrate that h ( p k + 1 ) < h ( p k ) for all k 0 .
  • h ( p k + 1 ) = p k + 1 · 2 ( k + 1 ) = p k + 1 2 · 2 k ,
  • We want h ( p k + 1 ) < h ( p k ) = p k · 2 k , which implies:
    p k + 1 2 · 2 k < p k · 2 k p k + 1 < 2 p k .
Let us analyze this condition considering the rules of g.

6.2.1. Case 1: p k even ( p k · 3 2 is an integer)

If p k is even:
  • p k + 1 = g ( p k ) = 3 2 p k ,
  • We verify: 3 2 p k < 2 p k , since 3 2 < 2 , which always holds,
  • Then:
    h ( p k + 1 ) = 3 2 p k · 2 ( k + 1 ) = 3 2 p k · 1 2 · 2 k = 3 4 p k · 2 k = 3 4 h ( p k ) < h ( p k ) ,
  • This strictly satisfies the decrease condition.

6.2.2. Case 2: p k odd ( p k · 3 2 is not an integer)

If p k is odd:
  • x 0 = 3 2 p k = 1.5 p k is not an integer,
  • We iterate x i + 1 = x i + 0.5 2 until x m is an integer, and p k + 1 = x m ,
  • General expression:
    x m = 1.5 p k + 0.5 m 2 m ,
    where m is the minimum number of iterations required for x m Z .
General proof of p k + 1 < 2 p k : For x m to be an integer, 1.5 p k + 0.5 m = 3 p k + m 2 must be divisible by 2 m . Since p k is odd, 3 p k is also odd, and m determines divisibility. Let v 2 ( p k ) = 0 (the 2-adic valuation of p k ), then: - v 2 ( 3 p k ) = 0 , - x m = 3 p k + m 2 m must be an integer, implying 3 p k + m = 2 m q for some q Z , - m is the smallest integer such that 3 p k + m is divisible by 2 m .
Consider the relative growth: - Initially, x 0 = 1.5 p k < 2 p k , - Each iteration reduces the value: - x 1 = 1.5 p k + 0.5 2 = 0.75 p k + 0.25 , - x 2 = x 1 + 0.5 2 = 0.75 p k + 0.75 2 = 0.375 p k + 0.375 , - In general, x m < 2 p k because: - x 0 < 2 p k , - x i + 1 = x i + 0.5 2 < 2 p k 2 + 0.25 = p k + 0.25 < 2 p k (since p k 1 ), - Thus, for any m where x m is an integer, x m < 2 p k .
Verification with examples: - p k = 3 : - x 0 = 4.5 , x 1 = 2.5 , x 2 = 1.5 , x 3 = 1 ( m = 3 ), - p k + 1 = 1 < 6 , - p k = 7 : - x 0 = 10.5 , x 1 = 5.5 , x 2 = 3 ( m = 2 ), - p k + 1 = 3 < 14 .
Therefore, p k + 1 < 2 p k holds in all cases, and:
h ( p k + 1 ) = p k + 1 · 2 ( k + 1 ) < 2 p k · 1 2 · 2 k = p k · 2 k = h ( p k ) .

6.3. Formalized Examples

6.3.1. Example 1: p 0 = 5

  • Sequence: 5 7.5 4 6 9 13.5 7 10.5 5.5 3 4.5 2.5 1.5 1 ,
  • Integers ( p k ): 5 , 4 , 6 , 9 , 7 , 3 , 1 ,
  • Metric h ( p k ) : 5 · 2 0 = 5 , 4 · 2 1 = 2 , 6 · 2 2 = 1.5 , 9 · 2 3 = 1.125 , 7 · 2 4 = 0.4375 , 3 · 2 5 = 0.09375 , 1 · 2 6 = 0.015625 ,
  • Verification: Strictly decreases, terminates at p 6 = 1 .

6.3.2. Example 2: p 0 = 6

  • Sequence: 6 9 13.5 7 10.5 5.5 3 4.5 2.5 1.5 1 ,
  • Integers ( p k ): 6 , 9 , 7 , 3 , 1 ,
  • Metric h ( p k ) : 6 · 2 0 = 6 , 9 · 2 1 = 4.5 , 7 · 2 2 = 1.75 , 3 · 2 3 = 0.375 , 1 · 2 4 = 0.0625 ,
  • Verification: Strictly decreases, terminates at p 4 = 1 .

6.3.3. Example 3: p 0 = 13

  • Sequence: 13 19.5 10 15 22.5 11.5 6 9 13.5 7 10.5 5.5 3 4.5 2.5 1.5 1 ,
  • Integers ( p k ): 13 , 10 , 15 , 6 , 9 , 7 , 3 , 1 ,
  • Metric h ( p k ) : 13 · 2 0 = 13 , 10 · 2 1 = 5 , 15 · 2 2 = 3.75 , 6 · 2 3 = 0.75 , 9 · 2 4 = 0.5625 , 7 · 2 5 = 0.21875 , 3 · 2 6 = 0.046875 , 1 · 2 7 = 0.0078125 ,
  • Verification: Strictly decreases, terminates at p 7 = 1 .

6.3.4. Example 4: p 0 = 27

  • Sequence: 27 40.5 20.5 10.5 5.5 3 4.5 2.5 1.5 1 ,
  • Integers ( p k ): 27 , 3 , 1 ,
  • Metric h ( p k ) : 27 · 2 0 = 27 , 3 · 2 1 = 1.5 , 1 · 2 2 = 0.25 ,
  • Verification: Strictly decreases, terminates at p 2 = 1 .

6.4. Formal Proof of Convergence

Theorem 1. 
For every p 0 Z 1 , the sequence { p k } generated by g terminates at p t = 1 .
Proof. 
1.
Definition of the metric: h ( p k ) = p k · 2 k , with p 0 = n .
2.
Strict decrease:
  • h ( p k + 1 ) = p k + 1 · 2 ( k + 1 ) = p k + 1 2 · 2 k ,
  • For h ( p k + 1 ) < h ( p k ) , we require p k + 1 < 2 p k .
  • Case 1 ( p k even):
    • p k + 1 = 3 2 p k ,
    • 3 2 p k < 2 p k (since 3 2 < 2 ),
    • h ( p k + 1 ) = 3 4 h ( p k ) < h ( p k ) .
  • Case 2 ( p k odd):
    • x 0 = 1.5 p k , x m = 1.5 p k + 0.5 m 2 m ,
    • p k + 1 = x m when x m is an integer,
    • x 0 = 1.5 p k < 2 p k ,
    • Each step x i + 1 = x i + 0.5 2 reduces the relative value:
      x i + 1 < 2 p k 2 + 0.25 = p k + 0.25 < 2 p k ( for p k 1 ) ,
    • Thus, x m < 2 p k for any required m,
    • h ( p k + 1 ) = x m · 2 ( k + 1 ) < 2 p k · 1 2 · 2 k = p k · 2 k = h ( p k ) .
3.
Termination:
  • h ( p k ) strictly decreases,
  • p k 1 are positive integers,
  • If h ( p k ) 0 , p k must stabilize at 1 after a finite number of steps (there cannot be infinitely many distinct integers 1 ).
Thus, for any p 0 1 , { p k } converges to 1.    □

6.5. Generality and Robustness of the Proof

The demonstration establishes that p k + 1 < 2 p k in all cases of the algorithm:
  • When p k is even, the factor 3 2 < 2 ensures immediate decrease.
  • When p k is odd, the iteration x i + 1 = x i + 0.5 2 reduces the initial value 1.5 p k < 2 p k to an even smaller fraction after m steps, always maintaining p k + 1 < 2 p k . This stems from the controlled nature of the algorithm, where the moderate growth ( 3 2 ) is outweighed by frequent reductions ( x + 0.5 2 ).
The metric h ( p k ) = p k · 2 k precisely captures this behavior, guaranteeing that the sequence terminates at p t = 1 for all p 0 1 , completing a general and rigorous proof of the algorithm’s convergence.

7. Verification Script

The following Python script starts with a positive integer entered by the user and then:
  • Executes the Collatz conjecture, displaying the complete sequence,
  • Identifies the numbers corresponding to the 4 n 2 series and displays them,
  • Computes their positions and displays them,
  • Shows the number of Collatz iterations and the number of cycles to the series,
  • Applies the positional algorithm from the first position and displays the obtained positions,
  • Compares the algorithm’s positions with those from Collatz and reports whether they are exactly the same or not,
  • Calculates the metric h ( p k ) to confirm that it strictly decreases until converging to 1 and displays it.
def collatz(n):
    numero_de_iteraciones_en_Collatz = 0
    secuencia_completa = [n]
    subconjunto_A = []
    if (n - 2) % 4 == 0:
        subconjunto_A.append(n)
    while n != 2:
        if n % 2 == 0:
            n = n // 2
        else:
            n = 3 * n + 1
        secuencia_completa.append(n)
        if (n - 2) % 4 == 0:
            subconjunto_A.append(n)
        numero_de_iteraciones_en_Collatz += 1
    return numero_de_iteraciones_en_Collatz, secuencia_completa, subconjunto_A
if __name__ == "__main__":
    try:
        numero_inicio = int(input("Enter a number to execute the Collatz conjecture: "))
        if numero_inicio < 1:
            print("Please enter a positive integer.")
        else:
            posicion = int((numero_inicio + 2) / 4)
    except ValueError:
        print("Invalid input. Please enter an integer.")
    try:
        if posicion < 1:
            print("Error.")
        else:
            numero = numero_inicio
            print("\nExecuting the Collatz conjecture...\n")
            iteraciones, secuencia_completa, subconjunto_A = collatz(numero)
            numero_de_ciclos = len(subconjunto_A)
            posiciones = tuple((x + 2) // 4 for x in subconjunto_A)
            print("Complete sequence:")
            print(secuencia_completa)
            print("\nSequence of numbers belonging to the subset A series of even numbers defined by (4*n - 2):")
            print(subconjunto_A)
            print("\nPositions within the subset A series in each cycle:")
            print(posiciones)
            print("\nNumber of Collatz iterations:", iteraciones)
            print("Number of cycles within subset A:", numero_de_ciclos)
    except ValueError:
        print("Invalid input. Please enter an integer.")
def obtener_siguiente_posicion(posicionalgoritmo):
    # Multiply the position by 1.5
    x = posicionalgoritmo * 1.5
    # While x is not an integer, apply (x + 0.5) / 2
    while not x.is_integer():
        x = (x + 0.5) / 2
    return int(x)
# POSITION ALGORITHM
# Request the initial position
posicionalgoritmo = int(posiciones[0])
posicionesalgoritmo = (posicionalgoritmo,)
# Generate the sequence until reaching 1
while posicionalgoritmo != 1:
    posicionalgoritmo = obtener_siguiente_posicion(posicionalgoritmo)
    posicionesalgoritmo += (posicionalgoritmo,)
# Display the tuples
print("\nExecuting the positional algorithm...")
print("\nPositions within subset A generated by the algorithm:", posicionesalgoritmo)
# Compare the tuples
if posiciones == posicionesalgoritmo:
    print("\nALGORITHM CHECK: The positions are exactly the same as those obtained by applying the Collatz conjecture.\n")
else:
    print("\nALGORITHM CHECK: The positions do not match.\n")
# METRIC FOR DEMONSTRATING CONVERGENCE OF THE ALGORITHM
print("\nExecuting the metric to demonstrate convergence to 1 of the algorithm...\n")
def apply_rule(x):
    """Applies the rule of our conjecture."""
    if x.is_integer():
        return 1.5 * x  # If integer, multiply by 3/2
    else:
        return (x + 0.5) / 2  # If not integer, add 0.5 and divide by 2
def simulate_conjecture(n):
    """Simulates the conjecture, computes h(n_k), and verifies if it decreases strictly."""
    if not isinstance(n, int) or n < 1:
        print("Please enter a positive integer.")
        return
    # Lists to store the sequence and integers
    sequence = [n]
    current = float(n)
    integers = [n]
    h_values = [n * 2**0]  # List for h(n_k) values
    max_steps = 100000000000000000000  # Limit to avoid infinite loops
    # Generate the sequence until reaching 1
    for step in range(1, max_steps):
        next_value = apply_rule(current)
        sequence.append(next_value)
        # If the value is an integer, add it to the list and compute h
        if next_value.is_integer():
            integers.append(int(next_value))
            k = len(integers) - 1  # Index of the new integer
            h_k = next_value * (2 ** (-k))
            h_values.append(h_k)
        # If we reach 1 as an integer, stop
        if next_value == 1:
            current = next_value
            break
        current = next_value
    # Check if we terminated at 1
    if current != 1:
        print("Did not reach 1 within the step limit. Something went wrong!")
        return
    # Display the table of integers and metric
    print(f"\nIntegers in the sequence (n_k) and metric h(n_k):")
    print("k | n_k | h(n_k)")
    print("-" * 30)
    for k, (nk, hk) in enumerate(zip(integers, h_values)):
        print(f"{k} | {nk} | {hk}")
    # Verify if h(n_k) strictly decreases
    decreases_strictly = True
    for i in range(1, len(h_values)):
        if h_values[i] >= h_values[i-1]:
            decreases_strictly = False
            print(f"\nWarning! h(n_{i}) = {h_values[i]} >= h(n_{i-1}) = {h_values[i-1]}")
            break
    # Final report
    print("\nVerification result:")
    if decreases_strictly:
        print("The metric h(n_k) strictly decreases at each step.")
    else:
        print("The metric h(n_k) does NOT strictly decrease at each step.")
def main():
    """Main function to run the program."""
    try:
        n = int(posiciones[0])
        simulate_conjecture(n)
    except ValueError:
        print("Please enter a valid integer.\n")
if __name__ == "__main__":
    main()

8. Conclusion

We have demonstrated that the Collatz conjecture drives sequences through cycles that converge to the series 4 n 2 , terminating at the number 2. Our positional algorithm, along with the metric h ( p k ) , confirms convergence to position 1, validating the conjecture for all positive integers and providing a significant advancement in its understanding.

References

1.
L. Collatz, "Über eine Vermutung über die Iterationen von 3 n + 1 ," unpublished note, 1937 (attributed origin of the Collatz conjecture).
2.
J. C. Lagarias, "The Ultimate Challenge: The 3 x + 1 Problem," American Mathematical Society, 2010.
3.
T. Tao, "Almost all orbits of the Collatz map attain almost bounded values," arXiv:1909.03562, 2019.
4.
C. J. Everett, "Iteration of the number-theoretic function f ( 2 n ) = n , f ( 2 n + 1 ) = 3 n + 2 ," Advances in Mathematics, vol. 25, no. 1, pp. 42–45, 1977.
5.
J. H. Conway, "On unsettleable arithmetical problems," American Mathematical Monthly, vol. 79, no. 2, pp. 192–195, 1972.
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.
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.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings

© 2025 MDPI (Basel, Switzerland) unless otherwise stated