# WXML Number Theory and Noise project page

• intro page, with description of the sequence-to-sound process
• the how-to-make-sound instructions page
• a big list of sequences from the OEIS that might be worth generating sounds from (note that this list is not updated as sounds are made, so some have already been done!)
• A few thoughts to use as a guide when investigating sequence sounds

### Useful tools

• Audacity - free software for playing and analyzing sound
• GP/PARI - a nice, free, easy-to-install-and-work-with computer algebra system; very convenient for generating integer sequences.

A note on GP usage: when generating a sequence in GP, you can use the write command to output to a file. This, however, is often slow, since it requires opening the file for every term of the sequence.

Alternately, you can have GP print all the terms of your sequence to the terminal window, and then "select all"-copy-paste into a text editor. This is probably the most straight-forward method.

Another method is to use the tee command (in any unix-like environment, like Terminal on a Mac) and call gp like this:

`gp | tee output.txt `
This will start gp, but all output will be echoed to the file output.txt. Then, you can do something like
`for(i=1,10^6,if(isprime(i),print(i))) `
to spit out all primes under 106 to the screen. Then quit gp, and open output.txt in a text editor and you will see all the primes there. Remove any extraneous lines, save, and you'll be ready to feed it to the list-to-sound code.

• Python code examples
• GP code examples
• DIY discrete Fourier transforms for your sequences

### Subprojects/topics for further explorations

• The complement of the primes, the composite numbers, can be built up as a union of disjoint subsequences: n congruent to 0 mod 2, n congruent to 3 mod 6, n congruent to 5 or 25 mod 30, etc. The sum of the waveforms of these separate sequences is the waveform for the composites, which is identical to the waveform of the primes with a simple inversion: it is flipped upside down. The spectra add, too, so we can use this method to argue for the existence of spectra in the prime waveform. It would be great if someone made a "sampler" sound file illustrating this processes, starting with the even numbers, and adding in the next sequence every second or two until the sound is indistinguishable from the primes.
• Symmetry in the spectra. For many sequences, the spectra appear symmetric with respect to 44100/4=11025 hz. When does this happen, and when does it not? Check out the spectra of the primes and the Ulam numbers (or a Beatty sequence) to see two type. Notice that kx=22050-x for some integer k if and only if x=22050/(k+1). So if x=22050/(k+1) is in the spectrum, then multiples of x will be as well, and so 22050-x will be, which give us some symmetry.
• A001043: spectrum has low frequency notch: why?
• Beatty sequences: these all have a similar sound. It seems like we ought to be able to make some statements about the relationship between the sound and the irrational number the sequences is based on.
• Quadratic resiudue sequences: these sequences give rise to periodic waveforms, so we ought to be able to make some strong statements about their sounds. Check out this Wikipedia article which discusses the use of quadratic residues (and primitive roots) in making sound diffusors.
• Longer sounds: what is the experience of listening to a sequence for 5, 10, 30 minutes like?
• Inverse: take recordings of sounds and convert them into sounds that could be generated by a sequence (and hence generate a sequence) to investigate what sounds are possible from integer sequences with the method of this project. Check out this page for some examples.
• If we shift a sine wave by half of its period, and add it to the original, the two cancel each other out perfectly. So, if we shift a waveform by 2 samples (i.e., 2/44100 seconds) and add to the original, we will get cancellation at the frequency that has wavelength (i.e., period) of 2*(2/44100) = 4/44100 = 1/11025 sec. The frequency is thus 11025 hz. So shifting by two samples and adding will result in cancellation at 11025 hz, and attenuation around 11025 hz. We can see this in the spectrograms of the twin primes (A001097) and other sequences (e.g., A045718). What other sequences can this idea be applied to?