Recently on MathTrek: Coins, Art, and Math in North Bay -- 6/13/98 World's Fastest Man -- 6/6/98 Cubes of Perfection -- 5/16/98
##### June 20, 1998

Prime Listening

The human ear has remarkable capabilities—so remarkable that we generally accept as routine such formidable tasks as recognizing a voice, picking out a single word in a cacophony of cocktail-party chatter, or hearing a flute’s sweet tone in the midst of an orchestral romp.

Our sense of hearing can integrate disparate sounds into a harmonious whole or detect subtle nuances buried in noise. It has amazing powers of pattern recognition. Indeed, by using sound to represent masses of data or jumbles of numbers, we can take advantage of that capability to identify regularities or make subtle distinctions.

Mathematician Chris K. Caldwell of the University of Tennessee in Martin has developed a scheme for listening to sequences of primes—to hear both simple patterns and perplexing irregularities found among those numbers.

"Multimedia allows the use of sight and sound, so why not use sound?" Caldwell asks. "After all, don’t we use our ears to detect patterns as we listen to the car motor for a problem or shake a box to determine its contents?"

The MIDI (Musical Instrument Digital Interface) specification often used in computer programs to represent musical notes assigns a number to each note on a keyboard. According to this recipe, middle C is 60, C-sharp is 61, D is 62, and so on, for a total of 128 notes. One could use that correspondence directly to "play" primes. For example, 67 would then be G.

There are infinitely many primes, however, so Caldwell’s strategy is to divide each prime by a fixed number, then play just the remainder—a novel application of that standard number-theory tool known as modular arithmetic. For example, if the divisor, or modulus, is 7, then for the primes {2, 3, 5, 7, 11, 13, 17, 19, 23. . .}, one would play {2, 3, 5, 0, 4, 6, 3, 5, 2. . .}. Because those particular notes on the MIDI scale would be too low in frequency to be audible, Caldwell adds a constant, such as 55. Hence, the first prime, 2, is played as the note A. There are seven possible notes.

 Primes modulo seven.

In listening to the primes modulo 7, one finds that all seven notes are played, but the lowest notes occurs just once. That lowest note is the prime number 7. Any other number that leaves a remainder of 0 when divided by 7 must be a multiple of 7, so it can’t be a prime. A theorem of Peter Gustav Lejeune Dirichlet (1805–1859) on primes in arithmetic progression guarantees that all the other notes are heard infinitely often when one plays all the primes.

Trying various prime and composite divisors reveals other patterns, and one can check which notes are played infinitely often, which ones are played just once, and which ones are never played for each modulus.

It’s possible to use the duration of notes to represent the gaps between prime numbers. There’s no gap between the first two primes, 2 and 3. There’s a gap of one between 3 and 5, a gap of one between 5 and 7, and a gap of three between 7 and 11. According to the prime number theorem (see Prime Theorem of the Century), the average gap length up to a certain prime equals the value of the natural logarithm of that prime (see Prime Gaps).

Caldwell makes the note representing a particular prime last a time proportional to the size of the gap to the next prime in the sequence, divided by the natural logarithm of that prime.

You can sample Caldwell’s "Prime Number Listening Guide" and hear his weirdly tuneful "primes modulo 41 with prime gap tempo" and other primal sounds at http://www.utm.edu/research/primes/programs/music/listen/.

There may be more to come. Caldwell has already started to develop a program to play the factorizations of sequences of numbers. "The low primes are used to determine what percussion instrument to play, the next larger primes are mapped to one instrument, and the larger ones (modulo some base) are mapped to a second," he says. "If the integer is divisible by a power (greater than 1) of the prime, then that prime’s ‘note’ is played louder."

It may be possible to hear more of the theorems that mathematicians have so painstakingly gleaned from their studies of whole numbers.

References:

Peterson, I. 1998. The Mathematical Tourist: New and Updated Snapshots of Modern Mathematics. New York: W.H. Freeman.

______. 1996. Sounds of the seasons. Science News 150(Dec. 21&28):400.

______. 1985. The sound of data. Science News 127(June 1):348.

Ribenboim, Paulo. 1996. The New Book of Prime Number Records. New York: Springer.

Chris Caldwell’s prime pages can be found at http://www.utm.edu/research/primes/.