Are the digits of pi random?

Ever since the dawn of mathematics (e.g., in ancient Greece, c. 250 BC) and decimal computation (e.g., in India, c. 200 AD), people have wondered whether the digits of the number we call pi (= 3.1415926535…) are “random.” Answering, or at least studying this question spurred mathematicians from Archimedes, who rigorously showed 223/71 < pi <22/7, and  Aryabhata, who computed pi to 4 decimal digits in 499 AD, to Shanks, who computed 707 digits in 1874 (alas, only 527 were correct; the error was only found after WW2), and on through the computer age to the present day. The current record of 10 trillion decimal digits is held by Alexander Yee and Shiguro Kondo. The present bloggers also confess to being fascinated by this question.

Recently this question came to public light with the circulation of a pi meme, which asserted, among other things, that

Pi is an infinite, nonrepeating decimal–meaning that every possible number combination exists somewhere in pi. Converted into ASCII text, somewhere in that infinite string of digits is the name of every person you will ever love, the date, time, and manner of your death, and the answers to all great questions of the universe. …

So is this really true? Are the digits of pi really “random”? Does every possible string of digits eventually occur somewhere in the decimal expansion of pi? The answer is “probably, maybe … ”

To begin with, we have to be careful what we mean by “random.” Clearly pi is not “random” in the strict sense, since individual digits are certainly not random, but instead are mathematically fixed. Perhaps a better and easier question is whether pi is “normal base ten,” which means that each digit 0-9 appears, in the limit, precisely 1/10 of the time; every two-digit string appears, in the limit, precisely 1/100 of the time; and similarly for every other finite-length string. One can also ask whether pi is “normal base two,” which means that each binary digit (0 or 1) appears 1/2 of the time; each two-digit string appears 1/4 of the time, etc.

The short answer to this question is that we do not know whether pi is normal or not, either for decimal digits or for digits in any other number base. Indeed, this question is a premier unsolved problem of mathematics. We do not even know the answer to much simpler questions, such as whether a 3 appears 1/10 the time in the decimal expansion of pi, or whether a 1 appears 1/2 the time in the binary expansion of pi. We cannot even prove there are infinitely many sevens in the decimal expansion of pi. A similarly appalling ignorance applies to most other constants of mathematics, such as e = 2.71828…, the base of natural logarithms, or the square root of two = 1.414213…

In recent years some sophisticated new tools have been brought to bear on the problem, with some initially promising results. For instance, the recently published paper Walking on real numbers, co-authored by Francisco J. Aragon Artacho, the present authors and Peter Borwein, analyzed digit expansions of mathematical constants by casting them as a random walk. For example, a number in base-4 format (i.e., using digits 0, 1, 2 and 3) can be visualized by starting at a given point, moving right one unit (for 0), up one unit (for 1), left one unit (for 2) or down one unit (for 3), and then continuing, one base-4 digit at a time, for as many digits as can be computed.

When the base-4 digits of pi are plotted by this rule, one obtains this strikingly beautiful plot:

This plot is entirely analogous to that of a number whose digits were generated by a pseudorandom number generator:

So, in other words, from these results it is certainly plausible that pi is “normal,” as defined above. But we have no proof.

Interestingly, we have been able to prove that some other numbers are normal to certain bases. One example is Stoneham’s constant, namely
1/2 + 1/(3×23) + 1/(32x232) + 1/(33x233) + …
which in decimal digits is 0.54188368083150298507…, and in binary digits is 0.100010101011100011100011100…

Stoneham’s constant is provably normal base 2 (i.e., in binary digits). Thus, in a rigorous mathematical sense, the binary digit expansion of this number, if suitably encoded, does in fact contain not only one’s personal information (as fantasized in the pi meme above), but also the entire works of Shakespeare (or any other work one cares to name), end to end without any errors. In fact, the binary expansion of Stoneham’s constant contains the works of Shakespeare infinitely many times!

Alas, the binary expansion of Stoneham’s constant also includes every conceivable collection of misprints of the works of Shakespeare, so it won’t really help much with your English literature homework.

But an even more curious fact is that Stoneham’s constant is provably not normal in other bases, including, for example, base 6. This can be seen visually by analyzing the random walk plot of the binary digits of Stoneham’s number:

Compare this now with the random walk of the base-6 digits of Stoneham’s constant, which has a decidedly nonrandom-looking plot:

The digits of pi, and of other well-known mathematical constants, have inspired mathematicians for centuries. Pi has been computed to prodigiously high precision, recently to more than 10 trillion digits by Alexander Yee and Shiguro Kondo, in part to facilitate research into such questions. It certainly appears that pi is a normal number, not only in base 2 and in base 10 but in other bases as well. But sadly, as noted above, there is no proof. (Some very recent empirical analysis of the first 16 trillion binary digits, corresponding to a bit less than 5 trillion decimal digits—by the current authors and several coauthors—strongly suggests that pi is normal base two, but again this is not a proof.)

So can this question forever survive the onslaught of a worldwide-networked, computer-savvy army of mathematicians, assisted by some of the world’s most powerful computer systems? We shall see.

For additional details, please see the CARMA walking on numbers project site. One particularly engaging tool to try is the Gigapan pi site, which permits one to zoom in and explore a 100 billion step walk on the binary digits of pi, created by Francisco Aragon Artacho. JMB’s talk for Pi Day 2013 and the related article Pi from Archimedes to ENIAC and beyond contain additional information.

[This also appeared in the Huffington Post.]

[Added 25 Apr 2013:] Here is a related column by Evelyn Lamb from Slate.

Comments are closed.