
Prime Numbers
.pdf422 |
Chapter 8 THE UBIQUITY OF PRIME NUMBERS |
Using appropriate banks of unitary operators, it turns out that if q > n, and x be a chosen residue (mod n), then one can also form the state
1 |
2d −1 |
|
|
|
|
ψ = |
2d/2 |
| xa mod n , |
|
|
a=0 |
again as a superposition. The di erence now is that if we ask for the probability that the entire register be found in state | b , that probability is zero unless b is an a-th power residue modulo n.
We end this very brief conceptual sketch by noting that the sovereign of all divide-and-conquer algorithms, namely the FFT, can be given a concise QTM form. It turns out that by employing unitary operators, all of them pairwise as above, in a specific order, one can create the state
1 |
q−1 |
|
|
|
|
ψ = √ |
q |
e2πiac/q | c , |
|
|
a=0 |
and this allows for many interesting algorithms to go through on QTMs— at least in principle—with polynomial-time complexity. For the moment, we remark that addition, multiplication, division, modular powering and FFT can all be done in time O(dα), where d is the number of qbits in each of (finitely many) registers and α is some appropriate power. The aforementioned references have all the details for these fundamental operations. Though nobody has carried out the actual QTM arithmetic—only a few atomic sites have been built so far in laboratories—the literature descriptions are clear: We expect nature to be able to perform massive parallelism on d-bit integers, in time only a power of d.
8.5.2The Shor quantum algorithm for factoring
Just as we so briefly overviewed the QTM concept, we now also briefly discuss some of the new quantum algorithms that pertain to number-theoretical problems. It is an astute observation in [Shor 1994, 1999] that one may factor n by finding the exponent orders of random integers (mod n) via the following proposition.
Proposition 8.5.1. Suppose the odd integer n > 1 has exactly k distinct prime factors. For a randomly chosen member y of Zn with multiplicative
order r, the probability that r is even and that yr/2 ≡ −1 (mod n) is at least
1 − 1/2k−1.
(See Exercise 8.22, for a slightly stronger result.) The implication of this proposition is that one can—at least in principle—factor n by finding “a few” integers y with corresponding (even) orders r. For having done that, we look at
gcd(yr/2 − 1, n)

8.5 Quantum computation |
423 |
for a nontrivial factor of n, which should work with |
good chance, since |
yr −1 = (yr/2 +1)(yr/2 −1) ≡ 0 (mod n); in fact this will work with probability at least 1 − 1/2k−1, and this expression is not less than 1/2, provided that n is neither a prime nor a prime power.
So the Shor algorithm comes down to finding the orders of random residues modulo n. For a conventional TM, this is a stultifying problem— a manifestation of the discrete logarithm (DL) problem. But for a QTM, the natural parallelism renders this residue-order determination not so di cult. We paraphrase a form of Shor’s algorithm, drawing from the treatments of [Williams and Clearwater 1998], [Shor 1999]. We stress that an appropriate machine has not been built, but if it were the following algorithm is expected to work. And, there is nothing preventing one trying the following on a conventional Turing machine; and then, of course, experiencing an exponential slowdown for which QTMs have been proposed as a remedy.
Algorithm 8.5.2 (Shor quantum algorithm for factoring). Given an odd integer n that is neither prime nor a power of a prime, this algorithm attempts to return a nontrivial factor of n via quantum computation.
1. [Initialize]
Choose q = 2d with n2 ≤ q < 2n2;
Fill a d-qbit quantum register with the state:
q−1
1
ψ1 = √q a=0 | a ;
2. [Choose a base]
Choose random x [2, n − 2] but coprime to n;
3. [Create all powers]
Using quantum powering on ψ1, fill a second register with
1 |
q−1 |
|
|
|
|
ψ2 = √ |
q |
| xa mod n ; |
|
|
a=0 |
4. [Perform a quantum FFT]
Apply FFT to the second quantum register, to obtain
q−1 q−1
ψ3 = 1q e2πiac/q | c | xa mod n ; a=0 c=0
5. [Detect periodicity in xa]
Measure the state ψ3, and employ (classical TM) side calculations to infer the period r as the minimum power enjoying xr ≡ 1 (mod n);
6. [Resolution]
if(r odd) goto [Choose a base];
Use Proposition 8.5.1 to attempt to produce a nontrivial factor of n. On failure, goto [Choose a base];

8.6 Curious, anecdotal, and interdisciplinary references to primes |
425 |
they pertain to the technology of error-correcting codes, discrete Fourier transforms (DFTs) over fields relevant to acoustics, the use of the M¨obius µ and other functions in science, and so on. To convey a hint of how far the interdisciplinary connections can reach, we hereby cite Schroeder’s observation that certain astronomical experiments to verify aspects of Einstein’s general relativity involved such weak signals that error-correcting codes (and hence finite fields) were invoked. This kind of argument shows how certain cultural or scientific achievements do depend, at some level, on prime numbers. A pleasingly recreational source for interdisciplinary prime-number investigations is [Caldwell 1999].
In biology, prime numbers appear in contexts such as the following one, from [Yoshimura 1997]. We quote the author directly in order to show how prime numbers can figure into a field or a culture, without much of the standard number-theoretical language, rather with certain intuitive inferences relied upon instead:
Periodical cicadas (Magicicada spp.) are known for their strikingly synchronized emergence, strong site tenacity, and unusually long (17and 13-yr) life cycles for insects. Several explanations have been proposed for the origin and maintenance of synchronization. However, no satisfactory explanations have been made for the origins of the prime-numbered life cycles. I present an evolutionary hypothesis of a forced developmental delay due to climate cooling during ice ages. Under this scenario, extremely low adult densities, caused by their extremely long juvenile stages, selected for synchronized emergence and site tenacity because of limited mating opportunities. The prime numbers (13 and 17) were selected for as life cycles because these cycles were least likely to coemerge, hybridize, and break down with other synchronized cycles.
It is interesting that the literature predating Yoshimura is fairly involved, with at least three di erent explanations of why prime-numbered life cycles such as 13 and 17 years would evolve. Any of the old and new theories should, of course, exploit the fact of minimal divisors for primes, and indeed the attempts to do this are evident in the literature (see, for example, the various review works referenced in [Yoshimura 1997]). To convey a notion of the kind of argument one might use for evolution of prime life cycles, imagine a predator with a life cycle of 2 years—an even number—synchronized, of course, to the solar-driven seasons, with periodicity of those 2 years in most every facet of life such as reproduction and death. Because this period does not divide a 13or 17-year one, the predators will from time to time go relatively hungry. This is not the only type of argument—for some such arguments do not involve predation whatsoever, rather depend on the internal competition and fitness of the prime-cycle species itself—but the lack of divisibility is always present, as it should be, in any evolutionary argument. In a word, such lines of thought must explain among other things why a life cycle with a substantial number of divisors has led to extinction.

426 |
Chapter 8 THE UBIQUITY OF PRIME NUMBERS |
Another appearance of the noble primes—this time in connection with molecular biology—is in [Yan et al. 1991]. These authors infer that certain amino acid sequences in genetic matter exhibit patterns expected of (binary representations of) prime numbers. In one segment they say:
Additively generated numbers can be primes or nonprimes. Multiplicatively generated numbers are nonprimes (“composites” in number theory terminology). Thus, prime numbers are more creative than nonprimes . . . .
The creativeness and indivisibility of prime numbers leads one to infer that primes smaller than 64 are the number equivalents of amino acids; or that amino acids are such Euclid units of living molecules.
The authors go on to suggest Diophantine rules for their theory. The present authors do not intend to critique the interdisciplinary notion that composite numbers somehow contain less information (are less profound) than the primes. Rather, we simply point out that some thought has gone into this connection with genetic codes.
Let us next mention some involvements of prime numbers in the particular field of physics. We have already touched upon the connection of quantum computation and number-theoretical problems. Aside from that, there is the fascinating history of the Hilbert–P´olya conjecture, saying in essence that the behavior of the Riemann zeta function on the critical line Re(s) = 1/2 depends somehow on a mysterious (complex) Hermitian operator, of which the critical zeros would be eigenvalues. Any results along these lines—even partial results—would have direct implications about prime numbers, as we saw in Chapter 1. The study of the distribution of eigenvalues of certain matrices has been a strong focus of theoretical physicists for decades. In the early 1970s, a chance conversation between F. Dyson, one of the foremost researchers on the physics side of random matrix work, and H. Montgomery, a number theorist investigating the influence of critical zeros of the zeta function on primes, led them to realize that some aspects of the distribution of eigenvalues of random matrices are very close to those of the critical zeros. As a result, it is widely conjectured that the mysterious operator that would
give rise to the properties of ζ is of the Gaussian unitary ensemble (GUE)
√
class. A relevant n × n matrix G in such a theory has Gaa = xaa 2 and for
a > b, Gab = xab + iyab, together with the Hermitian condition Gab = Gba; where every xab, yab is a Gaussian random variable with unit variance, mean
zero. The works of [Odlyzko 1987, 1992, 1994, 2005] show that the statistics of consecutive critical zeros are in many ways equivalent—experimentally speaking—to the theoretical distribution of eigenvalues of a large such matrix G. In particular, let {zn : n = 1, 2, . . .} be the collection of the (positive) imaginary parts of the critical zeros of ζ, in increasing order. It is known from the deeper theory of the ζ function that the quantity
δn = zn+1 − zn ln zn
2π 2π
8.6 Curious, anecdotal, and interdisciplinary references to primes |
427 |
has mean value 1. But computer plots of the histogram of δ values show a remarkable agreement for the same (theoretically known) statistic on eigenvalues of a GUE matrix. Such comparisons have been done on over 108 zeros neighboring zN where N ≈ 1020 (though the work of [Odlyzko 2005] involves 1010 zeros of even greater height). The situation is therefore compelling: There may well be an operator whose eigenvalues are precisely the Riemann critical zeros (scaled by the logarithmic factor). But the situation is not as clean as it may appear. For one thing, Odlyzko has plotted the Fourier
transform
N +40000
eixzn ,
N +1
and it does not exhibit the decay (in x) expected of GUE eigenvalues. In fact, there are spikes reported at x = pk, i.e., at prime-power frequencies. This is expected from a number-theoretical perspective. But from the physics perspective, one can say that the critical zeros exhibit “long-range correlation,” and it has been observed that such behavior would accrue if the critical zeros were not random GUE eigenvalues per se, but eigenvalues of some unknown Hamiltonian appropriate to a chaotic-dynamical system. In this connection, a great deal of fascinating work—by M. Berry and others— under the rubric of “quantum chaology” has arisen [Berry 1987].
There are yet other connections between the Riemann ζ and concepts from physics. For example, in [Borwein et al. 2000] one finds mention of an amusing connection between the Riemann ζ and quantum oscillators. In particular, as observed by Crandall in 1991, there exists a quantum wave function ψ(x, 0)— smooth, devoid of any zero crossings on the x axis—that after a finite time T of evolution under the Schr¨odinger equation becomes a “crinkly” wave function ψ(x, T ) with infinitely many zero crossings, and these zeros are precisely the zeros of ζ(1/2 + ix) on the critical line. In fact, for the wave function at the special time T in question, the specific eigenfunction expansion evaluates as
ψ(x, T ) = f |
1 |
+ ix ζ |
1 |
+ ix |
2 |
2 |
∞ |
|
2 |
2 |
= e−x |
/(2a |
) n=0 cn(−1)nH2n(x/a), (8.5) |
||||
|
|
|
|
|
|
|
|
|
for some positive real a and a certain sequence (cn) of real coe cients depending on a, with Hm being the standard Hermite polynomial of order m. Here, f (s) is an analytic function of s having no zeros. It is amusing that one may truncate the n-summation at some N , say, and numerically obtain— now as zeros of a degree-2N polynomial—fairly accurate critical zeros. For example, for N = 27 (so polynomial degree is 54) an experimental result appears in [Borwein et al. 2000] in which the first seven critical zeros are obtained, the first of which being to 10 good decimals. In this way one can in principle approximate arbitrarily closely the Riemann critical zeros as the eigenvalues of a Hessenberg matrix (which in turn are zeros of a particular polynomial). A fascinating phenomenon occurs in regard to the Riemann hypothesis, in the following way. If one truncates the Hermite sum above,
428 |
Chapter 8 THE UBIQUITY OF PRIME NUMBERS |
say at n = N , then one expects 2N complex zeros of the resulting, degree- 2N polynomial in x. But in practice, only some of these 2N zeros are real (i.e., such that 12 + ix is on the Riemann critical line). For large N , and again experimentally, the rest of the polynomial’s zeros are “expelled” a good distance away from the critical line. The Riemann hypothesis, if it is to be cast in language appropriate to the Hermite expansion, must somehow address this expulsion of nonreal polynomial zeros away from the real axis. Thus the Riemann hypothesis can be cast in terms of quantum dynamics in some fashion, and it is not out of the question that this kind of interdisciplinary approach could be fruitful.
An anecdote cannot be resisted here; this one concerns the field of engineering. Peculiar as it may seem today, the scientist and engineer van der Pol did, in the 1940s, exhibit tremendous courage in his “analog” manifestation of an interesting Fourier decomposition. An integral used by van der Pol was a special case (σ = 1/2) of the following relation, valid for s = σ + it, σ (0, 1) [Borwein et al. 2000]:
∞
ζ(s) = s e−σω ( eω − eω ) e−iωt dω.
−∞
Van der Pol actually built and tested an electronic circuit to carry out the requisite transform in analog fashion for σ = 1/2, [van der Pol 1947]. In today’s primarily digital world it yet remains an open question whether the van der Pol approach can be e ectively used with, say, a fast Fourier transform to approximate this interesting integral. In an even more speculative tone, one notes that in principle, at least, there could exist an analog device—say an extremely sophisticated circuit—that sensed the prime numbers, or something about such numbers, in this fashion.
At this juncture of our brief interdisciplinary overview, a word of caution is in order. One should not be led into a false presumption that theoretical physicists always endeavor to legitimize the prevailing conjectural models of the prime numbers or of the Riemann ζ function. For example, in the study [Shlesinger 1986], it is argued that if the critical behavior of ζ corresponds to a certain “fractal random walk” (technically, if the critical zeros determine a Levy flight in a precise, stochastic sense), then fundamental laws of probability are violated unless the Riemann hypothesis is false.
In recent years there has been a flurry of interdisciplinary activity— largely computational—relating the structure of the primes to the world of fractals. For example, in [Ares and Castro 2004] an attempt is made to explain hidden structure of the primes in terms of spin-physics systems and the Sierpi´nski gasket fractal; see also Exercise 8.26. A fascinating approach to a new characterization of the primes is that of [van Zyl and Hutchinson 2003], who work out a quantum potential whose eigenvalues (energy levels) are the prime numbers. Then they find that the fractal dimension of said potential is about 1.8, which indicates surprising irregularity. We stress that such developments certainly sound theoretical on the face of it, and some of

8.6 Curious, anecdotal, and interdisciplinary references to primes |
429 |
the research is indeed abstract, but it is modern computation that appears to drive such interdisciplinary work.
Also, one should not think that the appearance of primes in physics is relegated to studies of the Riemann ζ function. Indeed, [Vladimirov et al. 1994] authored an entire volume on the subject of p-adic field expansions in theoretical physics. They say:
Elaboration of the formalism of mathematical physics over a p-adic number field is an interesting enterprise apart from possible applications, as it promotes deeper understanding of the formalism of standard mathematical physics. One can think there is the following principle. Fundamental physical laws should admit of formulation invariant under a choice of a number field.
(The italics are theirs.) This quotation echoes the cooperative theme of the present section. Within this interesting reference one can find further references to p-adic quantum gravity and p-adic Einstein-relativistic equations.
Physicists have from time to time even performed “prime number experiments.” For example, [Wolf 1997] takes a signal, call it x = (x0, x1, . . . , xN −1), where a component xj is the count of primes over some interval. Specifically,
xj = π((j + 1)M ) − π(jM ),
where M is some fixed interval length. Then is considered the DFT
N −1
Xk = xj e−2πijk/N , j=0
of which the zeroth Fourier component is
X0 = π(M N ).
The interesting thing is that this particular signal exhibits the spectrum (the behavior in the index k) of “1/f ” noise—actually, we could call it “pink” noise. Specifically, Wolf claims that
|Xk|2 |
1 |
(8.6) |
kα |
with exponent α 1.64 . . . . This means that in the frequency domain (i.e., behavior in Fourier index k) the power law involves, evidently, a fractional power. Wolf suggests that perhaps this means that the prime numbers are in a “self-organized critical state,” pointing out that all possible (even) gaps between primes conjecturally occur so that there is no natural “length” scale. Such properties are also inherent in well-known complex systems that are also known to exhibit 1/kα noise. Though the power law may be imperfect
430 Chapter 8 THE UBIQUITY OF PRIME NUMBERS
in some asymptotic sense, Wolf finds it to hold over a very wide range of M, N . For example, M = 216, N = 238 gives a compelling and straight line on a (ln |Xk|2, ln k) plot with slope ≈ −1.64. Whether or not there will be a coherent theory of this exponent law (after all, it could be an empirical accident that has no real meaning for very large primes), the attractive idea here is to connect the behavior of complex systems with that of the prime numbers (see Exercise 8.33).
As for cultural (nonscientific, if you will) connections, there exist many references to the importance of very small primes such as 2, 3, 5, 7; such references ranging from the biblical to modern, satirical treatments. As just one of myriad examples of the latter type of writing, there is the piece in [Paulos 1995], from Forbes financial magazine, called “High 5 Jive,” being about the number 5, humorously laying out misconceptions that can be traced to the fact of five fingers on one hand. The number 7 also receives a great deal of airplay, as it were. In a piece by [Stuart 1996] in, of all things, a medical journal, the “magic of seven” is touted; for example, “The seven ages of man, the seven seas, the seven deadly sins, the seven league boot, seventh heaven, the seven wonders of the world, the seven pillars of wisdom, Snow White and the seven dwarves, 7-Up . . . .” The author goes on to describe how the Hippocratic healing tradition has for eons embraced the number 7 as important, e.g., in the number of days to bathe in certain waters to regain good health. It is of interest that the very small primes have, over thousands of years, provided fascination and mystique to all peoples, regardless of their mathematical persuasions. Of course, much the same thing could be said about certain small composites, like 6, 12. However, it would be interesting to know once and for all whether fascination with primes per se has occurred over the millennia because the primes are so dense in low-lying regions, or because the general population has an intuitive understanding of the special stature of the primes, thus prompting the human imagination to seize upon such numbers.
And there are numerous references to prime numbers in music theory and musicology, sometimes involving somewhat larger primes. For example, from the article [Warren 1995] we read:
Sets of 12 pitches are generated from a sequence of five consecutive prime numbers, each of which is multiplied by each of the three largest numbers in the sequence. Twelve scales are created in this manner, using the prime sequences up to the set (37, 41, 43, 47, 53). These scales give rise to pleasing dissonances that are exploited in compositions assisted by computer programs as well as in live keyboard improvisations.
And here is the abstract of a paper concerning musical correlations between primes and Fibonacci numbers [Dudon 1987] (note that the mention below of Fibonacci numbers is not the standard one, but closely related to it):
The Golden scale is a unique unequal temperament based on the Golden number. The equal temperaments most used, 5, 7, 12, 19, 31, 50, etc., are crystallizations through the numbers of the Fibonacci series, of the same

8.7 Exercises |
431 |
universal Golden scale, based on a geometry of intervals related in Golden proportion. The author provides the ratios and dimensions of its intervals and explains the specific intonation interest of such a cycle of Golden fifths, unfolding into microtonal coincidences with the first five significant prime numbers ratio intervals (3:5:7:11:13).
From these and other musicology references it appears that not just the very smallest primes, rather also some two-digit primes, play a role in music theory. Who can tell whether larger primes will one day appear in such investigations, especially given how forcefully the human–machine–algorithm interactions have emerged in modern times?
8.7Exercises
8.1. Explain quantitatively what R. Brent meant when he said that to remember the digits of 65537, you recite the mnemonic
“Fermat prime, maybe the largest.”
Along the same lines, to which factor of which Fermat number does the following mnemonic of J. Pollard apply?
“I am now entirely persuaded to employ rho method, a handy trick, on gigantic composite numbers.”
8.2. Over the years many attacks on the RSA cryptosystem have been developed, some of these attacks being elementary but some involving deep number-theoretical notions. Analyze one or more RSA attacks as follows:
(1)Say that a security provider wishes to live easily, dishing out the same modulus N = pq for each of U users. A trusted central authority, say, establishes for each user u [1, U ] a unique private key Du and public key (N, Eu). Argue carefully exactly why the entire system is insecure.
(2)Show that Alice could fool (an unsuspecting) Bob into signing a bogus (say harmful to Bob) message x, in the following sense. Referring to Algorithm
8.1.4, say that Alice chooses a random r and can get Bob to sign and
send back the “random” message x = rEB x mod NB. Show that Alice can then readily compute an s such that sEB mod NB = x, so that Alice would possess a signed version of the harmful x.
(3)Here we consider a small-private-exponent attack based on an analysis in [Wiener 1990]. Consider an RSA modulus N = pq with q < p < 2q. Assume the usual condition ED mod ϕ(N ) = 1, but we shall restrict the private exponent by D < N 1/4/3. Show first that
√
|N − ϕ(N )| < 3 N .
Show then the existence of an integer k such that
|
E |
|
k |
|
< |
1 |
|
N |
− D |
2D2 . |
|||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|