A New Visualization Framework for the $3n+1$ Problem via $\text{GF}(2)$ Algebraic Analysis × Fractal Geometry × Information Theory
Hiroshi Harada - April 4, 2026
This repository is a collection of research code for analyzing the unsolved Collatz conjecture (
In the traditional Collatz map, observing the internal structure of the trajectory is hindered by:
- Information loss due to right shifts (÷2) in even steps.
- Structural destruction caused by carries (carry propagation) during the
$3n+1$ odd steps.
To solve this problem, this repository introduces the following three models.
Constructs a Collatz map that discards zero information by eliminating right shifts and preserving the weight of the LSB.
Update rule:
Fully records the Shiftless trajectory by retaining carries during addition as polynomial coefficients instead of processing them immediately.
Evaluating the RB polynomial at
Extracts the pure fractal skeleton (Rule 90) by projecting the coefficients of the RB polynomial onto
The analysis in this project clarifies that the complexity of the Collatz trajectory can be explained by the interference of three elements: Order × Noise × Carry.
As a
→ A pure Sierpiński gasket emerges.
In the Shiftless model, at each step, LSB noise is injected:
→ It enters the "holes" of the fractal, causing local disturbances.
In the standard Collatz (
→ The collision of Order × Noise × Carry generates the "chaos" of the Collatz trajectory.
This repository includes the following analysis code.
| File Name | Description |
|---|---|
code_01_equivalence_shiftless.py |
Verifies equivalence between Shiftless and standard Collatz (odd sequence) |
code_02_equivalence_rb.py |
Verifies perfect match between RB polynomials and Shiftless |
code_03_3n.py |
Visualizes fractal destruction with and without |
code_04_carryless.py |
Compares Shiftless (noise + carry) and Carryless (noise only) |
- Python 3.8+
- NumPy
- Matplotlib
pip install numpy matplotlibEach script can be run independently.
Example:
python code_03_3n_carry_vs_carryless.pyThe generated figures allow you to visually compare the differences between:
- Fractal structures
- Noise injection
- Carry avalanches
- Python Source Code: MIT License - Research Documents / Theory: CC BY 4.0 - Copyright (c) 2026 Hiroshi Harada
This repository is designed as a "new platform to play with Collatz."
- Fractals
- Cellular Automata
$\text{GF}(2)$ - Information Theory
- Number Theory
It is created as a "playground" where these fields intersect, allowing researchers, math enthusiasts, and programmers to explore freely.