There’s a surprising mathematical ingredient in the sound of many performing artists and recording stars. It manifests itself in the form of clusters of panels hanging on the walls of recording studios, concert halls, nightclubs, and other venues. Sculpted from wooden strips separated by thin aluminum dividers, each panel consists of an array of wells of equal width but different depths.

Called reflection phase gratings, these panels scatter sound waves. The result is a richer, livelier sound with an enhanced sense of space. Listeners claim that the panels seem to make the walls disappear. A small room takes on the air of a great hall.

The secret lies in the varying depths of a panel’s wells. With depths based on specific sequences of numbers rooted in number theory, the wells scatter a broad range of frequencies evenly over a wide angle.

The scientist who pioneered the ideas responsible for this development is Manfred R. Schroeder of the University of Göttingen in Germany. In the 1970s, Schroeder and two collaborators undertook a major acoustical study of more than 20 famous European concert halls. One of their findings was that listeners like the sound of long, narrow halls better than that of wide halls. Perhaps the reason for this, Schroeder reasoned, is related to another finding that listeners prefer to hear somewhat different signals at each of their two ears.

In a wide hall, the first strong sound to arrive at a listener’s ears, after sound traveling directly from the stage, is the reflection from the ceiling. Ceiling reflections produce very similar signals at each ear. In narrow halls, however, the first reflections reach the listener from the left and right walls, and the two reflections are generally different.

This may be one reason why many modern halls are acoustically unpopular. Economic constraints dictate construction of wide halls to accommodate more seats, and modern air conditioning systems allow lower ceilings. To improve the acoustics of such halls, sound must be redirected from the ceiling toward the walls.

A flat surface by itself can’t do the job. It reflects sound in only one direction, according to the same rules that govern light reflecting from a mirror. The ceiling must have carefully orchestrated corrugations that scatter sound so that roughly the same amount of energy goes in every direction.

Schroeder discovered that number theory can be used to determine the ideal depth of the notches, resulting in an acoustic grating that’s analogous to diffraction gratings used to scatter light.

One effective acoustic grating is based on quadratic-residue sequences. Such a sequence consists of the remainders, or residues, after squaring consecutive whole numbers, then dividing them by a given prime number.

Suppose, for example, the given prime number is 17. The first sequence member is the remainder, or residue, after the first number, 1, is squared and divided by 17. The answer is 1. Squaring all the numbers from 1 to 16, then dividing by 17 and determining the residue, produces the sequence: 1, 4, 9, 16, 8, 2, 15, 13, 13, 15, 2, 8, 16, 9, 4, 1. For larger numbers, the pattern simply repeats itself.

Finding the depth of a given grating well involves multiplying the appropriate number in the sequence by the longest wavelength for which the grating is designed to scatter sound efficiently and then dividing by a factor that depends on the well’s numerical position. Mathematical analysis shows that for such an arrangement, the spectrum of energies scattered into different directions is essentially flat, meaning that roughly equal amounts of energy go in all directions.

Why does number theory work so well? The answer is in the way waves cancel or reinforce each other, depending on whether the crest of one wave meets the trough or crest of another wave. For perfectly periodic waves, destructive interference occurs whenever one wave lags behind the other by half a wavelength, one-and-a-half wavelengths, two-and-a-half wavelengths, and so on. In each case, it’s the extra half wavelength that decides when waves cancel each other out.

So, in wave interference, it’s not the total path difference between two waves that determines the resulting pattern but the residue after dividing by the wavelength. Hence, modular-arithmetic techniques and quadratic residues are relevant to acoustics.

Architectural acoustics designers have only three ingredients they can use to conjure up every imaginable type of acoustic environment; namely, absorption, reflection, and diffusion. Sound-absorbing surfaces made of foam or fiberglass and sound-reflecting surfaces, such as flat or curved panels, are widely used. Until reflection phase gratings came along, there really were no surfaces designed to spread sound around in both space and time. For designers, it was like trying to type a paragraph without using, say, the letter “d.”

In 1983, Peter D’Antonio, who was then a diffraction physicist at the Naval Research Laboratory, started RPG Diffusor Systems to bring reflection phase gratings to the acoustic marketplace (http://www.rpginc.com/). Based in Upper Marlboro, Md., the company now supplies acoustic diffusers for a wide variety of installations. In recent years, the company has developed additional diffuser designs based on such mathematical concepts as primitive roots (http://www.rpginc.com/products/skyline/index.htm) and fractals (http://www.rpginc.com/products/diffractal/index.htm).

Now that improved digital recordings, electronic instruments, and home theater systems are readily available, demand has increased for superior acoustic surroundings for making and listening to recordings. The use of reflection phase gratings to diffuse sound helps create a listening environment in the home and elsewhere that allows a listener to experience an old-fashioned concert-hall ambience.

Number theory makes an important contribution to the sound of music.