# Are the digits of pi random, or not?

**URL:** <https://boards.straightdope.com/t/are-the-digits-of-pi-random-or-not/74638>\
**Category:** Factual Questions\
**Created:** [August 2, 2001, 3:00pm UTC](https://boards.straightdope.com/t/are-the-digits-of-pi-random-or-not/74638 "2001-08-02T15:00:03Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joe\_Cool](https://avatars.discourse-cdn.com/v4/letter/j/ecb155/32.png) [@Joe\_Cool](https://boards.straightdope.com/u/Joe_Cool)\
**Post date:** [August 2, 2001, 3:00pm UTC](https://boards.straightdope.com/t/are-the-digits-of-pi-random-or-not/74638/1 "2001-08-02T15:00:03Z")

</div>

According to [this article](http://www.nature.com/nsu/010802/010802-9.html), a couple mathematicians have decided on a direction that will eventually lead them to a proof of the normality of pi. Meaning that its infinite expansion will contain all strings of numbers of any length with equal probability (1234567890 appears no less often than 1096389176 or any other ten-digit sequence).

But what is the significance of this, should it be proven true?

Question 2: They say that the successive groupings of 3 digits are random (3.14159… becomes .314, .141, .415, .159, etc). But the definition of randomness is a sequence such that the algorithm to describe it is no shorter than the sequence itself. Since this whole escapade arises from being able to calculate arbitrary digits of pi (which itself can be described by many, many different short algorithms) using a formula.

So…Since you can calculate the 4th, 100th, or 13,386,248th digit without knowing all the previous ones, aren’t the digits nonrandom BY DEFINITION??

What gives? Is there a different definition of randomness in number theory? How important is knowing whether pi is normal? Is it just a neat curiosity, or does it have greater mathematical implications?

---

<div class="post-metadata">

**Author:** ![erislover](https://avatars.discourse-cdn.com/v4/letter/e/71e660/32.png) [@erislover](https://boards.straightdope.com/u/erislover)\
**Post date:** [August 2, 2001, 3:04pm UTC](https://boards.straightdope.com/t/are-the-digits-of-pi-random-or-not/74638/2 "2001-08-02T15:04:56Z")

</div>

Tossing out a WAG… if you multiply any number by a normally distributed transcendental one (which pi is), the result, IMO, must be either zero or another irrational number.

Hmm. Or not, now that I think about it… crap. I can’t think of anything, apart fromt he knowledge of just knowing.

---

<div class="post-metadata">

**Author:** ![KarlGauss](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/karlgauss/32/3713_2.png) [@KarlGauss](https://boards.straightdope.com/u/KarlGauss)\
**Post date:** [August 2, 2001, 3:33pm UTC](https://boards.straightdope.com/t/are-the-digits-of-pi-random-or-not/74638/3 "2001-08-02T15:33:10Z")

</div>

As you state, the decimal expansion of pi is not random by definition: the digits are describable by an algorithm that’s shorter than simply doing the explicit calculation of the digits (this is, I think, Chaitin’s definition of non-random).

So I guess that the digits can _appear_ to be random in the sense that the decimal expansion contains all sequences of digits with equal probability.

As an aside, though, I thought I once read that _no_ infinite decimal expansion can contain all sequences of (1, 2, 3 … n …) digits so that they all appear random. This, of course, contradicts your statement “Meaning that its infinite expansion will contain all strings of numbers of any length with equal probability (1234567890 appears no less often than 1096389176 or any other ten-digit sequence).” Am I totally off-base?

---

<div class="post-metadata">

**Author:** ![Joe\_Cool](https://avatars.discourse-cdn.com/v4/letter/j/ecb155/32.png) [@Joe\_Cool](https://boards.straightdope.com/u/Joe_Cool)\
**Post date:** [August 2, 2001, 3:39pm UTC](https://boards.straightdope.com/t/are-the-digits-of-pi-random-or-not/74638/4 "2001-08-02T15:39:01Z")

</div>

> [@](#):
>
> \*Originally posted by KarlGauss \*  
> \*\*As an aside, though, I thought I once read that _no_ infinite decimal expansion can contain all sequences of (1, 2, 3 … n …) digits so that they all appear random. This, of course, contradicts your statement “Meaning that its infinite expansion will contain all strings of numbers of any length with equal probability (1234567890 appears no less often than 1096389176 or any other ten-digit sequence).” Am I totally off-base? \*\*

No, according to the article, that’s exactly the claim they’re trying to prove about pi. I don’t know whether it’s possible or not, I’m just parroting what I read. This is a little more advanced than I am. 🙂

Any recollection of where you read that, or whose theorem it is? I’d like to check it out.

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [August 2, 2001, 3:40pm UTC](https://boards.straightdope.com/t/are-the-digits-of-pi-random-or-not/74638/5 "2001-08-02T15:40:41Z")

</div>

> [@](#):
>
> \*Originally posted by erislover \*  
> **Tossing out a WAG… if you multiply any number by a normally distributed transcendental one (which pi is), the result, IMO, must be either zero or another irrational number.**

pi \* (1/pi) = 1, so that’s probably not quite true.

For the OP: the significance of a proof of the normality of pi is that it would be interesting. Most mathematicians don’t seem to need any further incentive.

From [http://www.best.com/~szabo/kolmogorov.html:](http://www.best.com/~szabo/kolmogorov.html:)

> [@](#):
>
> Pi is an infinite sequence of seemingly random digits, but it contains only a few bits of information: the size of the short program that can produce the consecutive bits of pi forever. Informally we say the descriptional complexity of pi is a constant. Formally we say K(pi) = 0(1), which means “K(pi) does not grow”.

In this case, K is a formal measure of the “randomness” of a string. If you’re interested in searching for more information, look under “Kolmogorov complexity”.

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [August 2, 2001, 3:44pm UTC](https://boards.straightdope.com/t/are-the-digits-of-pi-random-or-not/74638/6 "2001-08-02T15:44:11Z")

</div>

> [@](#):
>
> \*Originally posted by KarlGauss \*  
> \*\*As you state, the decimal expansion of pi is not random by definition: the digits are describable by an algorithm that’s shorter than simply doing the explicit calculation of the digits (this is, I think, Chaitin’s definition of non-random).
> 
> So I guess that the digits can _appear_ to be random in the sense that the decimal expansion contains all sequences of digits with equal probability.\*\*

That’s very close to the definitions of randomness that I’ve seen, if maybe a bit oversimplified. FWIW, there are two kinds of randomness being talked about here; one is the Kolmogorov-Chaitin type (definitely not easy to understand), and the other is uniformity (e.g., the digits of pi seem to be uniformly distributed over the set {0,…,9}).

> [@](#):
>
> \*\*As an aside, though, I thought I once read that _no_ infinite decimal expansion can contain all sequences of (1, 2, 3 … n …) digits so that they all appear random. This, of course, contradicts your statement “Meaning that its infinite expansion will contain all strings of numbers of any length with equal probability (1234567890 appears no less often than 1096389176 or any other ten-digit sequence).” Am I totally off-base? \*\*

I’ve never heard of this, but that doesn’t mean much.

---

<div class="post-metadata">

**Author:** ![KarlGauss](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/karlgauss/32/3713_2.png) [@KarlGauss](https://boards.straightdope.com/u/KarlGauss)\
**Post date:** [August 2, 2001, 3:56pm UTC](https://boards.straightdope.com/t/are-the-digits-of-pi-random-or-not/74638/7 "2001-08-02T15:56:44Z")

</div>

> [@](#):
>
> \*Originally posted by Joe\_Cool \*  
> \*\*  
> Any recollection of where you read that, or whose theorem it is? I’d like to check it out. \*\*

Yes, I know that was a vague, useless, statement I made. I’m not at home and can’t check my books but I _think_ it was either in **Morris Kline’s - Mathematics: The Loss of Certainty** or possibly **The Mathematical Experience by Davis and Hirsh**. (Neither of which would be a hard core reference, and both of which reveal the rather pedestrian level I’m at in such things)

I’ll be able to check it out much later tonight.

---

<div class="post-metadata">

**Author:** ![KarlGauss](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/karlgauss/32/3713_2.png) [@KarlGauss](https://boards.straightdope.com/u/KarlGauss)\
**Post date:** [August 2, 2001, 4:20pm UTC](https://boards.straightdope.com/t/are-the-digits-of-pi-random-or-not/74638/8 "2001-08-02T16:20:22Z")

</div>

OK. [Here](http://www.goertzel.org/books/intel/chapter_three.html) is a reference. Look at section **3.1**. The problem seems to lie with the difference between _eventually_ satisfying the criteria for randomness vs. _actually_ fulfilling it (i.e. having an expansion that approaches vs. actually contains **all** sequences of aribtrary length with equal probability).

---

<div class="post-metadata">

**Author:** ![erislover](https://avatars.discourse-cdn.com/v4/letter/e/71e660/32.png) [@erislover](https://boards.straightdope.com/u/erislover)\
**Post date:** [August 2, 2001, 4:32pm UTC](https://boards.straightdope.com/t/are-the-digits-of-pi-random-or-not/74638/9 "2001-08-02T16:32:54Z")

</div>

Incidentally, that The Mathematical Experience is great read even if it doesn’t apply to this, which I think it does.

---

<div class="post-metadata">

**Author:** ![Squink](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@Squink](https://boards.straightdope.com/u/Squink)\
**Post date:** [August 2, 2001, 7:49pm UTC](https://boards.straightdope.com/t/are-the-digits-of-pi-random-or-not/74638/10 "2001-08-02T19:49:14Z")

</div>

> [@](#):
>
> For the OP: the significance of a proof of the normality of pi is that it would be interesting. Most mathematicians don’t seem to need any further incentive.

For the rest of us it’s extremely convenient to have all the works of Shakespeare encoded in a nice, easy to remember, or at least generate, number. 😉

---

<div class="post-metadata">

**Author:** ![Cabbage](https://avatars.discourse-cdn.com/v4/letter/c/f07891/32.png) [@Cabbage](https://boards.straightdope.com/u/Cabbage)\
**Post date:** [August 2, 2001, 7:58pm UTC](https://boards.straightdope.com/t/are-the-digits-of-pi-random-or-not/74638/11 "2001-08-02T19:58:36Z")

</div>

You could call the definition of _normal number_ in the OP _normal number base ten_, since that’s the base we’re using. A number that is normal in _any_ base is called _absolutely normal_.

Absolutely normal numbers do exist, but we don’t know of any. The surprising thing is that _almost all_ of the real numbers are absolutely normal (“almost all” meaning the set of real numbers that are not normal has Lebesgue measure zero, a quick [cite](http://www.math.toronto.edu/~gerg/papers/AAN.html)). Another way to think of this–Suppose you pick a real number at random; then the probability it’s absolutely normal is one, the probability it’s not normal is zero.

Given that, you might think that absolutely normal numbers are actually common; however, as I said, we’ve never found a single one. Pi could be the first number we ever can know to be absolutely normal.

I’ve mentioned on other threads that an interesting thing about this is that an absolutely normal number will contain, in a sense, _all possible informartion_. Take any text, or piece of music, or whatever, and encode it using a sequence of digits–then that sequence is, of course, contained in the absolutely normal number. This may or may not have applications that will later be found, but it’s certainly interesting, I think.

---

<div class="post-metadata">

**Author:** ![Mangetout](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/mangetout/32/19_2.png) [@Mangetout](https://boards.straightdope.com/u/Mangetout)\
**Post date:** [August 2, 2001, 8:13pm UTC](https://boards.straightdope.com/t/are-the-digits-of-pi-random-or-not/74638/12 "2001-08-02T20:13:48Z")

</div>

[slight tangent]  
In Carl Sagan’s book _Contact_ (but not in the film) the main character is told by the aliens that the interstellar transport wormhole thingies were already there and they(the aliens) found them, they had been abandoned by an ancient race who had _shaped reality_ in some way; the aliens told her that, embedded in the decimal part of PI (when you get past zillions of decimal places) were messages of some sort)[/tangent]

Although that’s fiction, it must also be true; the digits of PI will probably have [what appear to be] intelligent patterns in them somewhere.

---

<div class="post-metadata">

**Author:** ![bonzer](https://avatars.discourse-cdn.com/v4/letter/b/45deac/32.png) [@bonzer](https://boards.straightdope.com/u/bonzer)\
**Post date:** [August 2, 2001, 9:16pm UTC](https://boards.straightdope.com/t/are-the-digits-of-pi-random-or-not/74638/13 "2001-08-02T21:16:22Z")

</div>

> [@](#):
>
> As an aside, though, I thought I once read that no infinite decimal expansion can contain all sequences of (1, 2, 3 … n …) digits so that they all appear random. This, of course, contradicts your statement “Meaning that its infinite expansion will contain all strings of numbers of any length with equal probability (1234567890 appears no less often than 1096389176 or any other ten-digit sequence).” Am I totally off-base?

Not quite. As **Cabbage** has pointed out, you’re groping towards the notion of a number being _normal_ in base ten. This is the generalisation of the idea that a random sequence should pass simple statistical tests like the probability of some digit being 3 is the same as it being 4.

Normal numbers in base 10 are certainly possible. Everybody’s favourite example is

```
        0.1234567891011...

```

However, while this passes all statistical tests for randomness that you might naively think up without seeing it, it’s clearly highly patterned. What’s wrong with it ? Well, one problem is that one can easily dig non-normal sequencies out of it. For instance, one can easily specify whereabouts 1, 10, 100 … are in it and hence, by zeroing in on the first digets of these, construct the infinite subsequence corresponding to

```
     0.111111111...

```

Hence it seems like a natural idea to suggest that we consider sequences for which _all_ infinite subsequences of them are normal in the relevant base. This seems to be a reasonable property to expect of a truly random sequence. But (and this is probably what **Gauss** was thinking of) there are no such sequences.

Lots of useful stuff on this subject in Knuth’s chapter on random numbers in volume 2, _Seminumerical Algorithms_. But anybody reading this thread to here probably already knew that …

---

<div class="post-metadata">

**Author:** ![CurtC](https://avatars.discourse-cdn.com/v4/letter/c/ce73a5/32.png) [@CurtC](https://boards.straightdope.com/u/CurtC)\
**Post date:** [August 3, 2001, 2:55am UTC](https://boards.straightdope.com/t/are-the-digits-of-pi-random-or-not/74638/14 "2001-08-03T02:55:58Z")

</div>

Joe\_Cool wrote:

> [@](#):
>
> So…Since you can calculate the 4th, 100th, or 13,386,248th digit without knowing all the previous ones…

I don’t think this matters concerning the “randomness,” but I’m fairly sure that you can’t calculate the nth digit of pi without knowing all the others before it. There’s not a formula that generates the nth digit. Instead, you have to do arithmetic on an infinite series of numbers, and if you want 1000 digits of precision, you have to carry out all those calculations with 1000 digits.

---

<div class="post-metadata">

**Author:** ![dorkbro](https://avatars.discourse-cdn.com/v4/letter/d/ed8c4c/32.png) [@dorkbro](https://boards.straightdope.com/u/dorkbro)\
**Post date:** [August 3, 2001, 3:19am UTC](https://boards.straightdope.com/t/are-the-digits-of-pi-random-or-not/74638/15 "2001-08-03T03:19:52Z")

</div>

Actually, it is possible to calculate a given digit of pi without calculating everything that comes before it. A proof of a method for doing this in binary or hexidecimal came out in the mid nineties, and [this paper](http://www.lacim.uqam.ca/plouffe/Simon/articlepi.html) describes a method for identifying decimal digits of pi and other such numbers.

The news that this could be done was big enough that I recall seeing some general media coverage (which there would have to be for me to know about this stuff)

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [August 3, 2001, 3:27am UTC](https://boards.straightdope.com/t/are-the-digits-of-pi-random-or-not/74638/16 "2001-08-03T03:27:36Z")

</div>

> [@](#):
>
> \*Originally posted by CurtC \*  
> \*\*Joe\_Cool wrote:
> 
> > [@](#):
> >
> > So…Since you can calculate the 4th, 100th, or 13,386,248th digit without knowing all the previous ones…
> 
> I don’t think this matters concerning the “randomness,” but I’m fairly sure that you can’t calculate the nth digit of pi without knowing all the others before it. There’s not a formula that generates the nth digit. Instead, you have to do arithmetic on an infinite series of numbers, and if you want 1000 digits of precision, you have to carry out all those calculations with 1000 digits. \*\*

This does matter with respect to the randomness; check the URL in my previous post.

---

<div class="post-metadata">

**Author:** ![KarlGauss](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/karlgauss/32/3713_2.png) [@KarlGauss](https://boards.straightdope.com/u/KarlGauss)\
**Post date:** [August 3, 2001, 3:32am UTC](https://boards.straightdope.com/t/are-the-digits-of-pi-random-or-not/74638/17 "2001-08-03T03:32:52Z")

</div>

**bonzer** and **Cabbage** : Thanks. Very helpful comments (and, **bonzer** , you are either giving me too much credit, or are a master diplomat, or were refering to the _other_ Gauss when you said, " this is probably what Gauss was thinking of".

---

<div class="post-metadata">

**Author:** ![Ross](https://avatars.discourse-cdn.com/v4/letter/r/e274bd/32.png) [@Ross](https://boards.straightdope.com/u/Ross)\
**Post date:** [August 4, 2001, 1:57am UTC](https://boards.straightdope.com/t/are-the-digits-of-pi-random-or-not/74638/18 "2001-08-04T01:57:27Z")

</div>

:blinks:

… You guys are… really smart…

:blinks:

… I can barely do arithmetic…

:smiles wistfully:

… it all sounds _really cool…_

Assuming it was all my maths teachers’ fault the first time around, how would an ordinary bum like me go about understanding this stuff?

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [August 4, 2001, 2:11am UTC](https://boards.straightdope.com/t/are-the-digits-of-pi-random-or-not/74638/19 "2001-08-04T02:11:19Z")

</div>

> [@](#):
>
> \*Originally posted by Ross \*  
> \*\*:blinks:
> 
> … You guys are… really smart…
> 
> :blinks:
> 
> … I can barely do arithmetic…
> 
> :smiles wistfully:
> 
> … it all sounds _really cool…_
> 
> Assuming it was all my maths teachers’ fault the first time around, how would an ordinary bum like me go about understanding this stuff? \*\*

The first thing to do is get yourself a good geometry book. I choose geometry because it’s very much like higher math, but it’s also something you can visualize, which would be very important for you to start with. You might want to move on from there to non-Euclidean geometry, which is similar enough to regular geometry that you shouldn’t find it too much more challenging, but crucially different. After that, look at some number theory, some abstract algebra, and some real analysis (I recommend K. G. Binmore’s analysis textbook, whose name escapes me at the moment). Spend some time reading them, don’t read too much new stuff per day, and work _lots_ of problems.

Most importantly, post in GQ with any questions you have. If you don’t feel something is worth taking to the board, feel free to e-mail me (address in profile); I should be able to help, although I reserve the right to tell you to ask the board at large. 😉

Also consider the advice of anyone else who responds to you. As you said, they’re very smart.

---

<div class="post-metadata">

**Author:** ![spingears](https://avatars.discourse-cdn.com/v4/letter/s/ebca7d/32.png) [@spingears](https://boards.straightdope.com/u/spingears)\
**Post date:** [February 19, 2004, 2:17am UTC](https://boards.straightdope.com/t/are-the-digits-of-pi-random-or-not/74638/20 "2004-02-19T02:17:24Z")

</div>

> [@Joe\_Cool](#):
>
> According to [this article](http://www.nature.com/nsu/010802/010802-9.html), a couple mathematicians have decided on a direction that will eventually lead them to a proof of the normality of pi.

Yup, and IF the extend the thing far enough it will also include all the works of shakespear and other assorted authors. Sortof like the myriad of monkeys banging away on typewriters to achieve the same end. :rolleyes:

Phu eee!

[Next page](https://boards.straightdope.com/t/are-the-digits-of-pi-random-or-not/74638.md?page=2)
