Simple wave-optical superpositions as prime number sieves
T. C. Petersen, M. Ceko, I. D. Svalbe, M. J. Morgan, A. I. Bishop and, D. M. Paganin

TL;DR
This paper demonstrates how simple wave superpositions can encode prime numbers and related number theory concepts, revealing a physical wave-based approach to understanding prime distributions and structures.
Contribution
It introduces a novel wave-optical method to encode primes and their properties, linking diffraction phenomena to number theory in a physically realizable system.
Findings
Primes are identified as zeros with phase singularities in wave fields.
Diffraction patterns encode primes, twin primes, and Gaussian primes.
Wave superpositions can produce the irregular distribution of primes from ordered systems.
Abstract
We encode the sequence of prime numbers into simple superpositions of identical waves, mimicking the archetypal prime number sieve of Eratosthenes. The primes are identified as zeros accompanied by phase singularities in a physically generated wave-field for integer valued momenta. Similarly, primes are encoded in the diffraction pattern from a simple single aperture and in the harmonics of a single vibrating resonator. Further, diffraction physics connections to number theory reveal how to encode all Gaussian primes, twin-primes, and how to construct wave fields with amplitudes equal to the divisor function at integer spatial frequencies. Remarkably, all of these basic diffraction phenomena reveal that the naturally irregular sequence of primes can arise from trivially ordered wave superpositions.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Simple wave-optical superpositions as prime number sieves
T. C. Petersen
School of Physics and Astronomy, Monash University, Victoria 3800, Australia.
M. Ceko
School of Physics and Astronomy, Monash University, Victoria 3800, Australia.
I. D. Svalbe
School of Physics and Astronomy, Monash University, Victoria 3800, Australia.
M. J. Morgan
School of Physics and Astronomy, Monash University, Victoria 3800, Australia.
A. I. Bishop
School of Physics and Astronomy, Monash University, Victoria 3800, Australia.
D. M. Paganin
School of Physics and Astronomy, Monash University, Victoria 3800, Australia.
Abstract
We encode the sequence of prime numbers into simple superpositions of identical waves, mimicking the archetypal prime number sieve of Eratosthenes. The primes are identified as zeros accompanied by phase singularities in a physically generated wave-field for integer valued momenta. Similarly, primes are encoded in the diffraction pattern from a simple single aperture and in the harmonics of a single vibrating resonator. Further, diffraction physics connections to number theory reveal how to encode all Gaussian primes, twin-primes, and how to construct wave fields with amplitudes equal to the divisor function at integer spatial frequencies. Remarkably, all of these basic diffraction phenomena reveal that the naturally irregular sequence of primes can arise from trivially ordered wave superpositions.
pacs:
PACS numbers:
††preprint: APS/123-QED
We may construe the distribution of primes as a puzzle in physics. Can the seemingly random yet highly orchestrated prime number distribution correspond to states of a physical system Susan ? Tentative affirmations have arisen from research into connections between physics and number theory, particularly via the Riemann zeta function RiemannReview . Building upon Euler’s connection between generalized harmonic series and products over primes, Riemann described a Fourier-like analysis to synthesize the prime counting function Havil . Hinging upon this construction is the placement of non-trivial zeros of the associated zeta function, which remains elusive PrimeBook .
Diverse studies have revealed the ‘physics of the Riemann hypothesis’, ranging from classical BilliardsBrunimovich and quantum billiard balls, quantum scattering and bound states to statistical physics, condensed matter and more RiemannReview . Notably, Berry and Keating related the zeros of the Riemann zeta function to eigenvalues in wave systems with classically chaotic trajectories, speculating on the centrality of a simple classical Hamiltonian BerryKeating . This approach was recently exploited by studying a non-Hermitian quantization of a Hamiltonian system with real eigenvalues, defined by a postulated maximally broken parity-time symmetry, to imply validity of the Riemann hypothesis Bender .
Diffraction physics is also rich in number theory connections such as Cantor set fractals arising from solitons in non-linear optical fibers CantorSet . The discovery of complex exponential Gauss sums in the fractional Talbot effect, which arise in analytic number theory, is particularly pertinent BerryKlein ; Talbot . Integer factorization was recently achieved in a wave optic experiment exploiting the Talbot effect TalbotPrimes . Similarly, approximations to Thomae’s ‘ruler function’, an exemplary pathological function of real analysis Burn , have been measured in visible light optics ThomaeExp . Factorization of a composite number using Gauss sums is also possible using Young’s N-slit diffraction YoungNSlit and has been demonstrated in Michelson interferometer experiments MichelsonGauss . For an initial wave with Fourier transform proportional to the Riemann zeta function on the critical line, Berry has constructed far-field radiation patterns with side-lobes separated by the Riemann zeros BerryRiemannI ; BerryRiemannII .
In this Letter we are interested in whether simple wave superposition can give rise to the prime number sequence, in the absence of dynamical chaos or dedicated factorization checks. We show that basic diffraction can sieve all multiples of composite numbers and thereby holographically encode the sequence of primes into a propagating wave-field. As such, these symmetric superpositions provide insights behind the orchestrated irregularity of the prime number sequence. Since the naturally diffracted fields are not defined by an algorithm, there are no sequential parameter adjustments and we do not exploit Gauss sums for factorizing specific composite numbers. Our construction is not based upon the Riemann zeta function or the Riemann hypothesis. The simplicity of this diffraction approach is exemplified by readily encoding other important sequences into propagating wave-fields, such as Gaussian primes, square-free integers, twin-primes and so on, as explained hereafter.
Wilson’s theorem, that a prime divides Havil , could be employed to design a field with amplitude , the integer floor of which provides an indicator function for primes over integer positions. Whilst oscillatory, the construction is nonetheless contrived. A step further could be to consider the product , which identifies all composite integer (non-prime) as a zero, since each sinc factor eliminates multiples of all but one integer of interest. Though based upon single-slit diffraction, it is difficult to envisage an experimental implementation of this series. We shall instead consider much simpler wave superpositions, which could be realized in an experiment – essentially the opposite of the sinc idea, whereby composites are discarded by removing zeros in the wave field.
Suppose a superposed set of identical scalar wave sources is located in the plane, with each source defined by wavefunction at position ; here the optic axis is along the direction. Far-field diffraction of can be written as the Fourier transform of convolved with a set of Dirac deltas , i.e., , where the spatial frequency or momentum is denoted by . For an diffraction grating with (for ), in dimensionless units, and likewise for the positions, the far-field wave is proportional to,
[TABLE]
where is the Fourier transform of . For ideal pinholes, tends to a constant and or then has form matching one of the graphs in Fig. 1 for a given .
Inspection of Fig. 1 shows that when or is a multiple of ; the wave amplitude is otherwise zero at all other integer values. This is consistent with l’Hôpital’s rule, which yields the limiting value , for integer divisible by when is zero and vice versa. Along either -axis, Eq. 1 can hence be viewed as a ruler for discrete momenta, with non-zero markings at integer multiples of . Superposing many different over a range of -values creates Moiré patterns at integer momenta, since the amplitude is only non-zero at these points for periodic multiples of each . This is similar to Eratosthenes’ scheme for eliminating composite numbers: if the natural numbers are associated with discrete momenta, non-zero amplitudes along either of the -axes indicate that a trial integer momentum of interest is composite. Closer correspondence is assured if additional zeros can be inscribed in each at or , for then a candidate prime location, on the particular -axis, remains zero if the momentum is not divisible by any of the in the sum over all . Such additional isolated zeros can be incorporated if the sources are simple modes of the paraxial Helmholtz equation.
Each temporal frequency component of a paraxial scalar wave satisfies the paraxial Helmholtz equation PagBook , where is the wave number. Among plane waves and other forms, exact solutions of this equation are given by the Hermite-Gauss modes, which are also eigenfunctions of the quantum harmonic oscillator. In the plane, up to a complex constant, the (0,0), (1,0) and (0,1) order modes can be written as , and , respectively, where = and is the beam waist at the plane . A superposition of (0,2) and (2,0) modes gives the quadratic form . Any of these waves in the limit would suffice for this discussion, which correspond to ‘polynomial waves’ PolyParaxDennis ; PolyPaganin .
For bounded in the implicit Fourier convention of Eq. 1, the relation holds. Similarly, . As such, contains a zero at the origin, which can be shifted along by units of momenta after applying a linear phase-ramp to tilt the wave array. Equivalent remarks hold if the identical wave sources are instead chosen to be . Phase ramps for each array could be difficult in an experiment but can be avoided by using the second-order mode sources, since contains a ring of zeros in the far-field, due to order gradients arising from the quadratic term . By careful choice of , the ring radius can be set to units of momenta.
The classical Eratosthenes algorithm iteratively eliminates composites by crossing out multiples of primes identified at each step. Our wave-optical approach automatically sieves all integer multiples and is hence less efficient. Nonetheless Eq. 2 represents a close analogy,
[TABLE]
where = , for a phase shifted array when each source is of type , or = for the second-order mode sources of width without a phase ramp. Using these superpositions, zeros in the far-field pattern at integer momenta on the axes indicate primes for integers , with non-zero amplitudes specifying composite numbers. Sifting occurs indefinitely beyond but some composite momenta will then also correspond to zero amplitudes. For a given signal-to-noise ratio, this sifting is physically limited by finite energy, giving rise to diminishing wave amplitudes at large .
Displaying the square root of the amplitude, Fig. 2 shows some examples of Eq. 2, with and , , producing Fig. 2(a) and the corresponding trace along in Fig. 2(c). The ring of size in Fig. 2(b) shows an example of for where and Fig. 2(d) shows a horizontal trace over discrete computed from Eq. 2 using sources with the sum maximum . Note the almost zero values for even integers, non-integers, and = 25 in Fig. 2(c), which is masquerading as a possible prime. The amplitude at = 25 evaluates to the tiny value of but is strictly zero for prime . These observations reveal important physical limitations for realizing wave-optical prime sieves. Similar remarks hold for the discrete plot in Fig. 2(c), for an un-shifted based source spectrum.
Simpler wave-optical prime sieves are possible if mimicry of Eratosthenes’ algorithm is jettisoned. Given that the trigonometric ratios in Eq. 1 provide the essential divisibility tests for or , it is instructive to devise more basic complex exponential sums over ordered rational frequencies. To this end, consider
[TABLE]
where and could correspond to respective momentum and position or vice versa. Note that the sign alternation for divisible by cancels that of the sine term, hence Eq. 3 is a simpler one-dimensional version of Eq. 1, which can be furnished with a given source term through convolution, if relevant. From a diffraction physics perspective, the inner sum in Eq. 3 can be viewed as a phase singularity Visser for integer not divisible by , since the phasor sum inscribes a circle as a regular polygon in the Argand plane, winding times about this polygon. When divides , the inner sum instead represents a plane wave of amplitude , since all phasors add along a line in the Argand plane. As with all sums here, only the real part of the superposition is of physical significance BornWolf .
The number-theoretic properties of Eq. 3 are interesting. The inner sum evaluates to for divisible by , and is zero for all other integer . is therefore the divisor function from number theory, describing the sum of all integers that divide integer . Equation 3 thus represents another type of sieve, for which candidate prime are identified as the fixed points . An interpretation in terms of Thomae’s ruler function Burn can also be made for ideal pin-holes, as explained in the Supplemental Material. In short, the distribution of the primes is given by the fixed points in the spectrum of Thomae’s function for integer .
Superpositions such as can be realized in simplified diffraction experiments. For example, identifying with position , the set of wave sources sampled by the 2D Dirac distribution produces a far-field diffraction pattern matching Eq. 3, along the axis for . Extra terms were included in Eq. 3 for aesthetic purposes to plot this distribution as the set of black squares in Fig. 3(a), where the numbers indicate the value of in the sum ( points down the page), which ranges up to maximum (cf. the set of natural line angles in the discrete Hough transform Imants ). Figure 3(a) alone reveals the asymptote towards Thomae’s function in the effective superposition, since there are roughly as many vertically aligned sources in the middle than the outermost columns, as many sources at either one or two s of horizontal distance , and so on. The Fourier transform of this distribution of ideal pinholes was computed and was subtracted from the wave amplitude to account for the additional sources arising from the terms. Further division by created the plot of normalized wave amplitude over discrete momenta (at ) shown in Fig. 3(b), where the red dots are primes. As expected, the unity values arise from fixed points in the normalized divisor function up until . For this chosen value of , primes are also uniquely identified by zeros in the wave field at integer up until , since there are no terms in the effective sum to contribute non-zero amplitude at discrete momenta . Beyond this , composite momenta can also give rise to zeros and the sieve no longer faithfully identifies candidate prime .
Small variations of Eq. 3, such as the inclusion of source types other than ideal pinholes, index changes, or reinterpretations of , can be used to adapt such wave sieves for other number theoretic wave fields of interest. For example, any integer can be represented as a unique product of squared and square-free integers, where a square-free integer contains no squares in its prime factor decomposition. By considering only rows in Fig. 3(a), the partial set of source locations then sifts integer momenta by the squares of all primes, resulting in zeros in the far-field diffraction pattern at integer momenta corresponding to all square-free numbers TwinPrimes .
An acoustic example is a vibrating pipe open at both ends. With identified as position along the pipe, the real part of Eq. 3 describes the longitudinal wave displacement as a set of modes for a pipe of length and particular harmonics , where LCM is the least common multiple. At time for , fixed points of the longitudinal wave displacement identify prime . For , zero wave displacement indicates prime . Dynamics can be included with, say, a linear dispersion relationship. The displacement at a pipe end would be prime at prime instances of time, in units scaled by the dispersion relation.
Other connections between basic diffraction physics and number theory are possible with further variants of Eq. 2 or Eq. 3. Two final number theoretical wave fields are worth discussing - a superposition containing the set of Gaussian primes and another that sieves twin primes.
For integers and , the Gaussian integers are complex numbers which can be uniquely factorized by other Gaussian integers known as ‘Gaussian primes’ that have norm equal to a prime number PrimeBook . When in Eq. 3 is interpreted as = , this superposition represents a sum of paraxial spherical waves on the optic axis , which automatically sifts Gaussian primes for integer and . The Gaussian sieve continuum in Fig. 4(a) was computed from Eq. 3 up to , ploting the square root of the intensity. The field is most intense at the origin, since all sources lie on the optic axis. The bright squares in Fig. 4(b) are the same data, where each square shows the fixed points of the wave at integer positions, corresponding precisely to all Gaussian primes. In experiment, the various phase curvature factors could arise from different source locations on the optic axis by extending Eq. 3, as shown in the Supplemental Material.
Any of our sieves can be applied concurrently to remove multiple distributions of integers, using the superposition principle. For example, twin primes were sieved by adding Eq. 2 to an identical wave shifted along by two integer units of momenta. The wave was set to unity for simplicity to yield the square root of intensity shown in Fig. 4(c), with in Eq. 2. The corresponding graph over discrete in Fig. 4(d) was computed after normalizing the wave magnitude by and subtracting one, such that twin primes appear as unique integer zeros. Generalizations to sieve other prime gaps, tuples etc. are possible. While finite energy constraints are fundamental, technical issues such as non-paraxial diffraction can be overcome as Eq. 3 can be viewed as a simple sum over plane waves.
In conclusion, a wide variety of prime number sieves has been demonstrated using simple wave superposition. Examples were chosen to easily locate prime numbers in frequency, space and time, placing constraints on the architecture of the source distributions. Given natural phenomena such as beats and modes, wave fields are littered with integers in general, so perhaps the set of prime numbers implicitly resides within more general wave-field superpositions.
T.C.P. acknowledges useful discussions with A.C.Y. Liu.
I Suppl. Mat.: The diffraction spectrum of Thomae’s function
Consider the function with the inclusion of wave sources normalized by , where is Fourier-conjugate to . The Fourier shift theorem gives
[TABLE]
where the sums range as in Eq. 3 of the main text and denotes convolution. Each row of these delta functions, evenly spaced on the unit interval, can be written as , where is the unit step function and is a Dirac comb with teeth separated by units on the axis. The inverse transform is then , where the sum runs from to . Consider now a rational point with co-prime , such that is divisible by and choose ideal pin-holes . Observe that
[TABLE]
since scaling by simply selects another tooth of the comb or else there are no teeth at either location and both sides are then zero. If is divisible by , the term gives unity for , as the fraction uniquely identifies just one tooth out of all combs in the double sum . This is true for all when tends to infinity, hence
[TABLE]
The definition of Thomae’s function is that for co-prime and zero for irrational arguments, which implies that
[TABLE]
II Suppl. Mat.: Gaussian prime sieve from a simple longitudinal grating
Consider near-field diffraction of a unit-amplitude plane wave through an ideal pin-hole on the optic axis, with the phase advanced to zero at the observation plane. The diffracted field is proportional to , after Fresnel propagation by the distance . The scattered wave from a complementary aperture, such as an opaque infinitesimal particle, is , by Babinet’s principle [20]. Consider now a distribution of such sources at non-overlapping inverse distances
[TABLE]
on the optic axis. By analogy with Fig. 3(a), this diffraction is from a single longitudinal grating. It can be shown that
[TABLE]
when divides and zero for all other dimensionless integers. For a successive sum over all , kinematical diffraction of a plane wave from this set of point-particles on the optic axis creates a near-field prime sieve superposition with wave amplitude proportional to , where is the second-order divisor function (the sum of squares of all factors of ). Normalization of the amplitude by gives unity for Gaussian prime and larger values for all other integer . Explicit scattering cross sections for identical scatterers can be included by convolution of a suitable function in the transverse coordinates, or for radially symmetric particles.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1(1) S. H. Marshall and D. R. Smith, Math. Mag. 86 , 189 (2013)
- 2(2) D. Schumayer and D. A. W. Hutchinson, Rev. Mod. Phys. 83 , 307 (2011).
- 3(3) J. Havil and F. Dyson, Gamma: Exploring Euler’s Constant , (Princeton University Press, Princeton and Oxford, 2003).
- 4(4) B. Mazur and W. Stein, Prime Numbers and the Riemann Hypothesis , (Cambridge University Press, Cambridge, 2016).
- 5(5) L. A. Bunimovich and C. P. Dettmann, Phys. Rev. Lett. 94 , 100201 (2005).
- 6(6) M. V. Berry and J. P. Keating, SIAM Rev. 41 , 236 (1999).
- 7(7) C. M. Bender, D. C. Brody and M. P. Müller, Phys. Rev. Lett. 118 , 130201 (2017).
- 8(8) S. Sears, M. Soljacic, M. Segev, D. Krylov and K. Bergman, Phys. Rev. Lett. 84 , 1902 (2000).
