The mathematical game that has gone decades without a winner

Published on June 05, 2026 | Translated from Spanish

The Collatz conjecture seems like child's play: pick a number, apply two simple rules, and you end up at 1. But mathematicians have been stuck for decades. No one has been able to prove it works for all numbers. A problem that deceives with its simplicity and has resisted the brightest minds on the planet. 🧠

mathematical sequence visualization showing numbers transforming through Collatz process, branching pathways collapsing into a single point, glowing number particles being divided and multiplied, abstract geometric nodes connected by luminous lines, infinite descent pattern with fractal-like structure, complex computational graph rendered in dark blue and gold, cinematic technical illustration, mathematical simulation with particle trails showing convergence, ultra-detailed algorithmic visualization, dramatic lighting on digital abstract forms, photorealistic engineering aesthetic

How to program a Collatz simulation in Python 💻

Implementing the algorithm is trivial. A while loop evaluates whether the number is even or odd. If it's even, you divide it by two; if it's odd, you apply 3n+1. The code runs in milliseconds for small values, but when testing with huge numbers, the computation time skyrockets. The sequence can stretch for hundreds of steps before collapsing into 1. It's a good exercise for learning flow control and loops in any programming language.

The algorithm that will make you feel very smart (or very foolish) 🤯

Programming Collatz gives you a false sense of power. You write it in five minutes, run it, and everything works. Then you think: What if I prove the conjecture myself? You spend an afternoon scribbling numbers. Then you remember that mathematicians with gray hair and huge blackboards have been at it for 90 years without success. Better close the editor and go make some coffee.