Prime numbers lie at the core of mathematics and modern cryptography. While every natural number can be expressed as a product of primes, their distribution remains one of the most mysterious patterns in mathematics.
Despite centuries of study, prime numbers appear irregular and unpredictable. This apparent randomness raises a deeper question: is there an underlying structure behind their distribution?
In this work, we explore prime numbers not as static elements, but as an emergent phenomenon arising from periodic motion and synchronization.
A Mechanical View of Prime Numbers
Instead of testing numbers for divisibility or checking potential factors, we construct a simple dynamical system:
- A set of concentric circles
- All rotating with the same linear speed
- Each circle starting from the same reference point
The smallest circle acts as a clock. Every time it completes a full rotation, a counter increases by one. Larger circles complete their rotations more slowly, according to their radius.
At specific moments, multiple circles reach the reference point simultaneously. At other moments, only the smallest circle does. And then this happens:
Whenever only the first circle completes a rotation, the counter corresponds to a prime number.
No division, no trial factors or checks of whether a number “fits” inside another. The system does not even know what a prime number is. Prime numbers simply emerge from the synchronization -or lack of it- between periodic motions.
An Algorithm Without Arithmetic Checks
From an algorithmic standpoint, the process is remarkably simple:
Cyclic Prime Emergence Algorithm
- Start with two concentric circles of radius r and 2r
- Rotate them with constant linear speed from the same starting point
- Each time the first circle completes a rotation:
- Increase a counter
- If no other circle finishes at the same time, the counter value n is prime.
- If the counter value n is prime then add a new circle whose radius is nr.
What is striking is that the algorithm does not rely on the numerical definition of primality. Instead, primality is encoded implicitly in periodicity and relative ratios.
These are the four first steps of the algorithm:
Key Differences from the Sieve of Eratosthenes
While inspired by classical number theory, this implementation has two fundamental shifts:
- Zero Divisions: Primality is determined through geometric resonance and phase alignment rather than arithmetic division ( n ( mod d ) ).
- Infinite Streaming: Unlike the static "batch" nature of Eratosthenes' sieve, this is an incremental process. It requires no predefined upper limit, allowing primes to emerge continuously as the simulation evolves.
Periodicity, Not Circles
It is important to emphasize that the circles themselves are not essential.
Τhe phenomenon relies on periodic motion -not on geometry as such. Circles merely provide the most intuitive and symmetric way for the human mind to visualize periodicity. In principle, any system capable of producing stable, repeating periods could replace the circles.
What matters are the relative periods and their synchronization -or lack thereof. In this sense, prime numbers appear not as purely numerical objects, but as consequences of timing.
A Connection to π
The circles reveal something else as well: the number π.
Each rotation inherently involves π, linking prime numbers to periodicity through geometry in a direct and visual way. This echoes Euler’s famous result, where an infinite product over prime numbers unexpectedly reveals π. Here, that connection becomes tangible.
Prime numbers are no longer abstract symbols, they are motions, rotations, and rhythms.
From Algorithm to Phenomenon
The longer the system runs, the less it feels like an algorithm and the more it resembles a physical process. We are not watching a computation, we are watching a phenomenon unfold. There is no defined stopping point. The process can continue indefinitely, limited only by time and resources.
This perspective does not replace the classical definition of prime numbers. Instead, it complements it -revealing that beneath divisibility lies a deeper structure based on periodicity and emergence.
Try It Yourself
An open-source implementation of this system is available, along with an interactive application used for the visualizations.
You can find the source code at Github: PrimesWithCircle or you can download directly the app from here.
The application runs in Windows 10 or later. Just extract the ZIP file and run PrimesWithCircles.exe from the folder.
You can also watch a presentation of the algorithm here: