The number pi (aka 3.1415926…) is a transcendental number most commonly known as the ratio of the circumference to the diameter of a circle. But there is a lot more to this number than most people know. Many books have been written on the properties of pi and there are many web sites dedicated to it (check out the Wikipedia link above). There is even a great off-the-wall independent movie called Pi.
One fascinating property is that while pi is obviously a very specific number, the sequence of digits in pi are, by any statistical measure, random. The numbers can be calculated out to any value you want in principle with enough time and computing power, but there is no (known) pattern to the numbers as a string of numbers. They are so random, in fact, you can use them as a random number generator and then do some fun analysis with it. For example, to celebrate Veterans Day, I wrote a quick little program that determines when my birthday 112368 (or any number you select) appears in pi out to a desired number of digits. For a number like 112368 you might expect roughly an average of 10 hits for any 10 million digits if the numbers in pi were random (taking all numbers between 0 and 999999 as the sample space). The actual number of times my birthday in that format appears is 8 for the first 10 million digits of pi, which is consistent with the random number idea.
Go to this web site (by David Anderson at CMU) and tinker around. Be sure and check out the FAQs and other pi resources.
There are some very strange consequences to the idea that the digits of pi form a random sequence. First, it is intrinsically unnerving to think a number with distinctly non-random utility is made of an infinitely long random group of numbers. It is a humble reminder that random and arbitrary do not mean the same thing: pi is made of a random string of numbers, but is by no means an arbitrary set nor is each number in that set arbitrary. If you changed just one digit in that infinite collection, it would by definition alter the very nature of (Euclidian) geometry. Interestingly, other transcendental numbers like e (~2.71828…) and irrational numbers like the square root of 2 (~1.41421) or the Golden Ratio (~1.61803…) have the same random properties as pi. I used the same birthday-seeking program I mentioned above for pi and found the same statistical distributions of my birthday for e and the phi. Although we may not personally know about all the digits in these numbers, they are all there pre-existing, fixed for us to discover (some of them) if we are motivated and capable.
This also highlights elements of transfinite algebra and the nature of infinity and large numbers. Georg Cantor realized that not all infinities (specifically infinitely large sets) are of equal size. It is fairly straightforward to show, for example, that the number of countable numbers (e.g. positive integers plus zero) is less than the continuum of numbers between 0 and 1 on the number line. He called that first type of infinity (number of integers) Aleph_0 and the second the “cardinality of the Reals” (conjectured to be Aleph_1). Aleph is the Hebrew letter for “A.” Strictly speaking, the aleph notion refers to the size of the set (cardinality) rather than the positioning and order of elements of the set (ordinal). These are usually one in the same for finite numbers (the number 13 tells you both its size and position in the set), but things get a little tricky for transfinite numbers. Anyway, when the dust settles, transfinite algebra is pretty easy: a finite number added to infinity is still infinity; a finite number multiplied by infinity is still infinity; a finite number divided by infinity is zero; a finite number to the power of infinity has the possibility of kicking you up to the next type of infinity (too complicated to go into here). The basic message is that any finite set (a string of everyday numbers, for example), no matter how large (in a finite sense), has no size compared to even the smallest transfinite set (Aleph_0). The number of digits in pi (which is Alpha_0) then mirrors this relationship. Keep in mind that we are not talking about some physical or “effective” infinity here. The number of atoms in the universe is very large, 10^80, but is also a set of zero size compared to the number of digits in pi.
Carl Sagan leveraged this randomness to make for a dramatic denouement in his book Contact. I won’t give anything away here (it isn’t the same ending as the 1997 movie).
The consequences of having a literally infinite set of calculable random numbers (as opposed to just a pretty big set of arbitrary numbers) is truly staggering if you give it a moment’s thought. Basically, any pattern of numbers you can image of ANY length (shy of infinitely long) exists in pi infinite times and in any form you choose to represent it. Ironically, it is exactly because the sequence of numbers in pi is random and infinite that this strangeness occurs: ALL possible patterns will be present simply by chance. Although counterintuitive, if all finite patterns are NOT present in an infinite random sequence, that is a much, much weirder situation! This is definitely freaky. In a crude analogy, to NOT have every finite pattern contained in an infinite set of random numbers would be like flipping a coin a million times and never getting the pattern tail-head-tail-head (no Rosencrantz & Guildenstern Are Dead coin flipping references intended). The probability of a specific global sample-wide configuration (e.g. “all heads”) drops as the sample space increases, but the probability of smaller sub-patterns existing SOMEWHERE in the sample goes UP as the sample space increases. In the case of pi, we have an infinitely large random sample space where all possible sub-patterns are of zero size in comparison.
As an example, if you converted Hamlet to ASCII binary, it MUST be in pi someplace. Indeed, not just “must be” but it is actually there an infinite number of times! There are about 32000 words in Hamlet averaging 6 characters per word giving 192000 characters. Converted to ASCII binary, there are 8 bytes per character or 6144000 individual numbers of 1s and 0s. So somewhere in pi there is an ordered sequence of 6144000 digits consisting of a sequence of 1s and 0s that, when converted to ASCII binary, gives you Hamlet. If this seems unlikely by any normal standard of existence, then your intuition is right on. The number of places in pi (or any random sequence) you must go in order to find some pattern N elements long goes like 10^N (e.g. for a birthday like 112368 you expect to need 10^6, or one million, digits to find one occurrence). But recall this is an infinite random sequence of numbers we are talking about and a mere 10^6144000 is very literally NOTHING by comparison to what it has to work with. As mentioned above, although 10^6144000 is frickin’ HUGE compared to anything we are used to thinking about (remember there are “only” a mere 10^80 atoms in the universe), it is still finite and has a zero size compared to the number of digits in pi. Indeed, pi has every major work that has been or will be published contained in its vastness in ASCII binary form (or any other form mapped to some number system). The same goes for music (e.g. converted to .wav format) or images (converted or jpeg). Recursively, pi has all finite portions of itself in it too. As a small example, with the search link above, it is easy to show that the usual sequence of 31415926 can be found at position 50,366,472 in pi (after the initial 3).
In short, infinitely long random numbers are just plain bizarre (but cool). This is sort of in the same vein as the famous monkeys at a typewriter discussion. With pi there is an added mind blowing twist: this is built into geometry itself. Looking for structure in pi is like observational astronomy while the monkeys at a typewriter game is like doing a set of active experiments in nuclear physics. In the former case, your data are all there and prearranged, you just need to find it. In the latter, you have to generate your data with a careful setup.
As an infinitely large set, pi really does have all the answers — you just have to know what you are looking for. Oh, and an infinitely powerful computer to find it. Ay, and there’s the rub.