Computing the Prime Wave: A complete guide for the rest of us.
Introduction: From Arithmetic to Geometry—Reframing the Integers
I. The Failure of Arithmetic Ontology
The natural numbers—1, 2, 3, 4, 5, …—have been studied for millennia. Yet despite their seeming simplicity, no aspect of number theory has evaded explanation more persistently than the behavior of prime numbers. These indivisible entities form the atomic core of all integers, and yet their distribution has eluded deterministic generation for centuries.
Traditional number theory relies on arithmetic constructs:
-
Division
-
Modular congruence
-
Sieve-based algorithms (e.g. Eratosthenes, Atkin, or Miller-Rabin)
-
Abstract analytic continuation (e.g. ζ(s), Dirichlet L-functions)
All of these techniques, while ingenious, suffer from the same core limitation: they test numbers for primality—they do not explain why primes arise at specific locations.
This manual introduces a new lens through which to view the integers—not as static entries in a sequence, but as rotational harmonic fields.
In this view:
-
Every integer induces a curvature field over a closed domain.
-
Divisibility becomes interference: the more divisors an integer has, the more it bends the field.
-
A prime number is a node of total cancellation—the only integer for which the field remains flat across all angular positions.
This is not numerology. It is not metaphor.
It is a shift from arithmetic symbolism to geometric behavior. And it is implemented, tested, and visualized through Python.
II. The Geometry of Divisors: Curvature Fields on the Circle
We begin with a redefinition.
Let the angular variable parameterize a circle. We interpret each integer as a wave-bearing object, not a point. Each of its nontrivial divisors (those not equal to 1 or ) imposes a rotational harmonic onto the circle.
Definition: The Divisor Curvature Field
For an integer , define:
This is the curvature field induced by the internal structure of . It represents the superposition of cosine waves at each divisor frequency .
-
If is prime, the sum is empty. Thus:
-
If is composite, this field contains standing-wave deformation nodes—constructive and destructive interference patterns created by the divisors.
Interpretation:
This field measures the bending of the circular domain caused by an integer’s divisor structure. The more divisors, the more complex the wave. Only primes leave the circle unbent.
III. Measuring the Field: Energy, Cancellation, and Silence
A field is not fully characterized by its shape. We require a measure of how much deformation it holds—its total energy.
Definition: The Total Curvature Energy
This expression combines:
-
The in-phase deformation:
-
The quadrature deformation: the derivative squared, capturing slope and turning points.
Together, this forms the angular energy density associated with the field.
But energy includes both structure and background bias. We must isolate interference patterns only.
Definition: Grounded Curvature Energy
To remove the DC (mean) component, define:
This “grounds” the energy. It cancels uniform offset, leaving only relative curvature variation.
Now the test becomes exact:
-
If , the integer is prime
-
Otherwise, it's composite
This is a functional test for primality—deterministic, geometrically grounded, and free of division or remainder tests.
IV. From Curvature to Spectrum: Factorization as Frequency Content
The divisor structure of is hidden in the frequencies used in the curvature field.
A cosine term for divisor introduces energy at frequency .
Thus, to see the divisor structure, we use:
Definition: Spectral Signature
Here, the Fast Fourier Transform reveals energy spikes at the exact divisor frequencies.
Implication:
-
If is composite, the spectrum is nonzero.
-
If is prime, the spectrum is entirely flat—no frequencies appear.
V. The Curvature Zeta Function
From this energy-based model, we define a new zeta analog:
Definition: Curvature Zeta Function
This sum mirrors the Riemann zeta function, but replaces the unit coefficients with physically computed curvature energies.
-
For primes,
-
For composites,
Hence, only composites contribute to the curvature zeta function.
This formalism gives geometric meaning to prime distribution and prepares the ground for a wave-propagated prime discovery mechanism.
VI. From Static Fields to Prime Propagation
The true innovation is not detecting primes—it’s predicting them.
Each prime cancels the interference of the past. That cancellation has a signature—a field residue. By inverting and projecting this residue forward, we define a prime wave that deterministically identifies the next null curvature node.
This is the foundation of recursive prime generation:
-
Each prime emits a cancellation wave.
-
The next prime is where that wave interferes with future divisor fields and silences the energy again.
VII. Why Python?
This is not just theory—it is computation. Python allows us to simulate and see every step:
-
The deformation field
-
Its energy and grounding
-
The spectrum of divisors
-
The recursive structure of primes
Each function in this teaching aid corresponds to a formal component of the theory. No part is metaphorical.
We do not guess primes. We reveal them through their geometry.
Getting Started
Use the following workflow:
-
Analyze any integer with
analyze_integer(n, plot=True)
→ View its curvature field, spectrum, and total energy. -
Visualize composite interference
→ Watch how deformation arises from multiple divisors. -
Backtrace and mirror the field
→ Understand how one prime leads to the next. -
Walk the prime wave
→ Build a prime propagator that finds primes by cancellation, not testing.
All code is included in the full Python notebook.
Final Note
What you are about to use is not a toolkit for number theory.
It is a new coordinate system for the integers.
This manual is your map. The field is your terrain. And the prime wave is the river that runs through it.
Let’s begin.
We propose a geometric view of number theory in which every integer is a standing wave over a circular domain. Instead of examining numbers as static algebraic values, we treat them as harmonic fields. In this formulation:
-
Primes are the only integers whose divisor-induced field is perfectly flat.
-
Composites exhibit curvature and interference due to their internal factors.
-
Primality, then, is not exclusion—but cancellation.
Let’s simulate this using Python.
Step 1: Define the Curvature Field
We model the integer’s internal divisor structure as a sum of cosine waves—one for each nontrivial divisor. This creates a deformation field over the circle:
If D_n(θ)
is identically zero, n
is prime. Otherwise, it's composite. This is our new test for primality.
Step 2: Compute the Field’s Energy
We calculate the total energy of the field using a Pythagorean formula: amplitude squared plus derivative squared.
This energy reveals where curvature accumulates. For primes, this entire field is zero.
Step 3: Remove Static Bias (Grounding)
We subtract the mean (DC offset) to isolate interference-only behavior.
This grounded energy isolates the resonant wave content—the signature of internal divisors.
Step 4: Spectral Decomposition (FFT)
We now perform a Fast Fourier Transform to reveal the divisor frequencies.
Each peak in the spectrum corresponds to a nontrivial divisor. If there are no peaks, then the number is prime.
Step 5: Calculate Total Field Energy Aₙ
We use this integral to define the coefficient of the curvature zeta function, ζ₍curv₎(s).
When A_n = 0
, the number is a null curvature field—a prime.
Step 6: Package the Pipeline
This one function tells you everything:
-
Is it a prime?
-
What frequencies dominate?
-
What is its wave signature?
Step 7: Prime Wave Recursion
We define a backward field by summing the curvature fields from previous integers. We then mirror that field forward to predict the next prime.
This is how the prime wave propagates: the next prime occurs when the field cancels again.
Conclusion: The Numbers as Fields
This Python notebook doesn’t simulate primes.
It reveals them.
Through these functions, we learn that:
-
Prime numbers are not scattered randomly.
-
They occur exactly where a curvature field, embedded in a circular domain, cancels itself completely.
-
The absence of interference is not trivial. It is deterministic, spectral, and recursive.
This theory redefines what an integer is. No longer a static symbol, it is a rotating harmonic signal in a compact field.
Primes are not generated. They emerge.
And now, through these simulations, so can understanding.
Aside: What Is the Zeta Function—Really?
At its core, the Riemann Zeta function is just a way to add up information about numbers in a very particular way. Traditionally, it's defined as:
where is a complex number.
When is a real number greater than 1, this just means:
-
Take the reciprocal of every number (like 1, 1/2, 1/3, 1/4, …),
-
Raise it to the power of ,
-
Then add them all together.
But something strange happens when you start extending this to complex numbers—and then asking: where does this infinite sum become zero?
Those zeros (called the nontrivial zeros) are the heart of the Riemann Hypothesis.
Why It Matters
The reason the zeta function is famous is because it encodes deep truths about the primes:
-
Euler discovered that you could factor the zeta function into primes:
This equation connects every number to the primes through an infinite product.
So instead of testing every number one at a time, the zeta function compresses information about all primes into one continuous object.
But Here's the Problem
The traditional zeta function doesn’t tell us why the primes are spaced the way they are. It reacts to prime distribution—it doesn’t generate it.
Even worse, when you look at the zeros of , you find beautiful patterns, but no physical reason they should exist at all. It's like seeing stars align without understanding the gravity that moves them.
Our New Approach
Instead of using:
we use:
Where is the total deformation energy from our curvature field model.
Now:
-
Primes contribute zero.
-
Composites contribute energy based on their divisors.
This isn't just a clever modification—it's a physical interpretation. We're not summing over abstract reciprocals anymore. We're summing over measurable wave interference, and the primes vanish not by magic, but because they carry no internal curvature.
So What Is the Zeta Function?
In this new model:
The zeta function is no longer a trick to test primes.
It is a resonance detector.
It tells us where the interference collapses, and where primes—those nodes of silence—emerge from the field.
It’s not about divergence or continuation.
It’s about conservation.
And that’s what makes it different.