Pi Day, 2011 (with Music)

Every year, we at CatSynth join numerous other mathematics enthusiasts, geeks and otherwise eccentric characters in celebrating Pi Day on March 14.

March 14 is notated in the U.S. and some other countries as “3-14”, which evokes the opening digits of π (pi). Although the date representation is a very arbitrary connection to the number, we also recognize that the representation of π in decimal digits is arbitrary, an accident of human beings having ten fingers. So this year we are exploring the representations in binary and other related bases.

To represent an integer in binary, one of course presents it as a sum of powers of two, e.g., 11 = 8 + 2 + 1 or 1011 in binary. But one can also represent fractional numbers in binary. Digits to the right of the decimal point represents powers of one-half. So the binary number 0.11 is 1/2 + 1/4, or 3/4. Fractions like 1/3 can be represented with repeating digits as 0.010101…, much like in base ten. And this concept can be extended to irrational numbers like π.

The author of this website has calculated 32768 digits of pi in binary. We reprint the first 258 below:

11.
00100100 00111111 01101010 10001000 10000101 10100011 00001000 11010011 
00010011 00011001 10001010 00101110 00000011 01110000 01110011 01000100 
10100100 00001001 00111000 00100010 00101001 10011111 00110001 11010000  
00001000 00101110 11111010 10011000 11101100 01001110 01101100 10001001 

The initial “11” represents the 3 in π, and the remaining digits begin the non-integral portion. Like in the decimal representation, the binary representation continues forever with no particular pattern. While not as iconic or memorable as the decimal representation 3.14159…, there is something about the binary representation that makes it seem more universal, i.e., based on fundamental mathematical truths rather than a quirk of human anatomy. For me, the binary representation also lends itself to musical ideas. And for the occasion, I have created a couple of short synthesized pieces representing the 32768 binary digits of pi. In the first example, each binary digit represents a sample. The “1” represents full amplitude and the zero represents no amplitude (silence). The result, which at 44.1kHz sample rate is less than one second long, can be heard below.

The random configuration of digits sounds like noise, and more specifically like white noise, suggesting something approaching uniform randomness at least to human hearing. I also made an example slowed down to a level whether the individual samples became musical events. I find this one quite interesting.

With some additional refinement (and may some more digits to extend the length), it could certainly stand alone as a composition.

One interesting counterpoint to the notion that digits of pi form white noise is a conjecture related to its representation in hexadecimal (base 16), which as a power of two is “closer” to binary and seemingly less arbitrary than decimal. From Wolfram MathWorld, we find the following “remarkable recursive formula conjectured to give the nth hexadecimal digit of π – 3 is given by where is the floor function:

The formula is attributed to (Borwein and Bailey 2003, Ch. 4; Bailey et al. 2007, pp. 22-23). If true, it would add some sense of order to the digits, and thus additional musical possibilities.

Properties of 2011

The number “2011” abounds with fun numerical and “visual-numerical” properties. Early into the new year, we experienced the time “1:11:11 on 1/1/11”. And this week, we had the even more auspicious “1:11:11 on 1/11/11”, at least with the date-writing convention we use in the United States. This week all the dates have been palindromes using the two-digit year convention, e.g., today is “1 14 11”, and if one uses the full four-digit year, this past Monday was “1 10 2011”, also a palindrome.

While text-based properties are fun, they are somewhat arbitrary and less interesting than mathematical properties of numbers. First, 2011 is a prime number, the first prime year since 2003. And from @mathematicsprof on twitter, we have this interesting coincidence:

“2011 is also the sum of 11 CONSECUTIVE prime numbers:
2011=157+163+167+173+179+181+191+193+197+199+211”
.

In other words, this is not just a series of prime numbers, but all the prime numbers between 157 and 211. I like that the last prime in the series happens to be 211!

The Republic of Math blog follows the consecutive-prime inquiry further, with the observation that 2011 can also be written as the sum of three consecutive primes “661 673 and 677”.

From The Power of Proofs, we have the property that 2011 is the sum of three squares:

2011 = 392 + 172 + 72

However, any number not congruent to 7 modulo 8 will have such a property. I.e., if you divide 2011 by 8, you have 3 left over. So really 7 out of 8 integers can be expressed this way. Finding the series of squares can take some time, though.

Please feel free to share any other mathematical or fun coincidental properties in the comments below.

Fun with stats: digits in Pi

From Eve Andersson's Pi land, we have these histograms of the frequency of (base 10) digits.

The first 100 digits of pi:

0 8
1 8
2 12
3 12
4 10
5 8
6 9
7 8
8 12
9 13

Things even out pretty nicely by about 1 million digits:

0 99959
1 99757
2 100026
3 100230
4 100230
5 100359
6 99548
7 99800
8 99985
9 100106

The digits are just white noise, there might be an interesting pattern now and then, but that is to be expected statistically. Besides, these are base 10 digits, which are an arbitrary representation based on the fact that we have two hands with five fingers apiece…

I could share some more interesting facts and formulae, but printing the greek character pi on a blog is, as they say, a pain in the butt. And I am not in the mood for that tonight.