Collatz Conjecture: A Simple yet Elusive Mathematical Problem

The Collatz Conjecture is a mathematical idea that many people believe to be true, but it remains unproven. It is named after German mathematician Lothar Collatz, who first proposed it in 1937. The conjecture is also known as the “3n + 1” sequence because it is generated by following two simple rules:

  1. If the starting number is even, divide it by 2.
  2. If the starting number is odd, multiply it by 3 and add 1.

The Collatz Conjecture states that regardless of the starting number, the sequence will always reach the number 1. This has been verified for all numbers below 268 using computer calculations. However, despite extensive testing, the conjecture remains unproven, and its status as a conjecture continues to intrigue mathematicians worldwide.

The Collatz Sequence

The Collatz sequence starts with any positive integer and follows the two rules mentioned above. For example, starting with the number 10, the sequence would be:

10 –> 5 –> 8 –> 4 –> 2 –> 1

This sequence is simple yet elusive, as it has properties that are still not fully understood.

Why is the Collatz Conjecture Important?

The Collatz Conjecture is significant because it is a simple problem that has stumped some of the world’s greatest mathematicians for decades. Despite the progress made in understanding the conjecture, it remains one of the most famous unsolved problems in mathematics.

The Search for a Solution

Mathematicians have tried various approaches to solve the Collatz Conjecture, including:

  1. Proving it theoretically using number theory or complex analysis.
  2. Using computer calculations to verify the conjecture for larger numbers.
  3. Exploring the properties of the Collatz sequence and looking for patterns that might lead to a proof.

However, none of these approaches have been successful in proving the Collatz Conjecture. The conjecture remains a mystery, and its resolution continues to be a goal for many mathematicians.

JS/HTML/CSS Code for Creating this Collatz Sequence & Graph Web Page:

<!DOCTYPE html>
<html>
<head>
  <title>Collatz Conjecture</title>
  <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
  <style>
    body {
      font-family: Arial, sans-serif;
    }
    #output {
      padding: 10px;
      border: 1px solid #ddd;
      background-color: #f8f8f8;
      font-size: 16px;
    }
    #chart {
      width: 100%;
      height: 500px;
    }
  </style>
</head>
<body>
  <h1>Collatz Conjecture</h1>
  <div id="output"></div>
  <div id="chart"></div>
  <script>
    google.charts.load('current', {'packages':['corechart']});

    function collatz(n) {
      let sequence = [n];
      while (n !== 1) {
        if (n % 2 === 0) {
          n = n / 2;
        } else {
          n = 3 * n + 1;
        }
        sequence.push(n);
      }
      return sequence;
    }

    function generateRandomCollatzAndChart() {
      let n = Math.floor(Math.random() * 100000) + 100;
      let sequence = collatz(n);
      let output = document.getElementById("output");
      output.innerHTML = "Starting number: " + n + "<br>" + sequence.join(", ");

      let data = new google.visualization.DataTable();
      data.addColumn('number', 'Step');
      data.addColumn('number', 'Value');
      for (let i = 0; i < sequence.length; i++) {
        data.addRow([i, sequence[i]]);
      }

      let options = {
        title: 'Collatz Sequence | Start Number: '+n+' | Steps: '+(sequence.length-1),
        curveType: 'function',
        legend: { position: 'bottom' }
      };

      let chart = new google.visualization.LineChart(document.getElementById('chart'));
      chart.draw(data, options);

      // Simulate the sleep function to generate the next sequence after 3 seconds
      setTimeout(generateRandomCollatzAndChart, 3000);
    }

    google.charts.setOnLoadCallback(generateRandomCollatzAndChart);
  </script>
</body>
</html>

Complex numbers, Argand and Euler planes

Complex numbers are numbers that consist of a real part and an imaginary part. They can be written in the form a + bi, where a and b are real numbers and i is the imaginary unit, which is defined as the square root of -1.

The real part of a complex number is denoted by Re(z) and the imaginary part by Im(z). The magnitude or absolute value of a complex number z is denoted by |z| and is equal to the distance from the origin to the point representing z in the complex plane.

The complex plane is a graphical representation of the set of complex numbers, where the real part of a complex number is plotted on the x-axis and the imaginary part is plotted on the y-axis. This allows us to visualize complex numbers as points in a two-dimensional space.

There are two commonly used systems for representing complex numbers graphically: the Argand plane and the Euler plane.

The Argand plane, named after the French mathematician Jean-Robert Argand, is a graphical representation of the complex plane where the x-axis represents the real part of a complex number and the y-axis represents the imaginary part. In the Argand plane, complex numbers are represented by points, and the magnitude and direction of a complex number can be easily visualized.

The Euler plane, named after the Swiss mathematician Leonhard Euler, is a modified version of the Argand plane, where the real and imaginary axes are rotated by an angle of 45 degrees. In the Euler plane, the x-axis represents the real part plus the imaginary part divided by the square root of 2, and the y-axis represents the imaginary part minus the real part divided by the square root of 2. The advantage of the Euler plane is that the multiplication of complex numbers corresponds to adding their angles in the plane, making it useful in certain applications, such as signal processing.

Given below is the Python script to create plots for the Argand and Euler planes using Python’s Matplotlib library.

import matplotlib.pyplot as plt
import numpy as np

# Create data for a complex number z = 3 + i
z = 3 + 1j

# Create data for the Argand plane
argand_x = [0, z.real]
argand_y = [0, z.imag]

# Create data for the Euler plane
euler_x = [0, z.real + z.imag / np.sqrt(2)]
euler_y = [0, z.imag - z.real / np.sqrt(2)]

# Create the plots
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(14,5))


ax1.plot(argand_x, argand_y, 'bo-')
ax1.set_xlabel('Real')
ax1.set_ylabel('Imaginary')
ax1.set_xlim([-4, 4])
ax1.set_ylim([-4, 4])
ax1.grid(True)

ax2.plot(euler_x, euler_y, 'ro-')
ax2.set_xlabel('Real + Imaginary / sqrt(2)')
ax2.set_ylabel('Imaginary - Real / sqrt(2)')
ax2.set_xlim([-4, 4])
ax2.set_ylim([-4, 4])
ax2.grid(True)

plt.show()