Q: Since pi is infinite, do its digits contain all finite sequences of numbers?

Mathematician: As it turns out, mathematicians do not yet know whether the digits of pi contains every single finite sequence of numbers. That being said, many mathematicians suspect that this is the case, which would imply not only that the digits of pi contain any number that you can think of, but also that they contains a binary representation of britney spears’ DNA, as well as a jpeg encoded image of you making out with a polar bear. Unfortunately, to this day it has not even been proven whether every single digit from 0 to 9 occurs an unlimited number of times in pi’s decimal representation (so, after some point, pi might only contain the digits 0 and 1, for example). On the other hand, since pi is an irrational number, we do know that its digits never terminate, and it does not contain an infinitely repeating sequence (like 12341234123412341234…).

One thing to note is that when mathematicians study the first trillion or so digits of pi on a computer, they find that the digits appear to be statistically random in the sense that the probability of each digit occurring appears to be independent of what digits came just before it. Furthermore, each digit (0 through 9) appears to occur essentially one tenth of the time, as would be expected if the digits had been generated uniformly at random.

While tests performed on samples can never unequivocally prove that a sequence is random (in fact, we know the digits of pi are not random, since we know formulas to generate them) the apparent randomness in pi is consistent with the idea that it contains all finite sequences (or, at least, all fairly short ones). In particular, if we generate a number from an infinite stream of digits selected uniformly at random, then there is a probability of 100% that such a number contains each and every finite sequences of digits, and pi has the appearance of being statistically random.

The following rather remarkable website allows you to search the digits of pi for specific integer sequences:

http://www.angio.net/pi/piquery

As it turns out, my social security number occurs near digit 100 million.

Physicist: One of my favorites.  Slow to converge, but fast to remember.  \pi = 4 \sum_{n=0}^\infty \frac{(-1)^n}{2n+1} = 4 \left( 1 - \frac{1}{3} + \frac{1}{5} - \frac{1}{7} +\frac{1}{9} \cdots \right)

This entry was posted in -- By the Mathematician, Math. Bookmark the permalink.

77 Responses to Q: Since pi is infinite, do its digits contain all finite sequences of numbers?

  1. Visar says:

    And if we eventually get bored of the amazing infinite “Pi”, we can always grab another number from the infinite pool of the irrational numbers. Shit, if we could do this that with a single number, image what we could do with all (infinite number) of them. @@

  2. Kayser says:

    If the numbers are random, wouldn’t the address statistically be of equal length as the sequence. I e a sequence of n numbers would be found at an address that is n numbers long?

  3. Pingback: El número Pi contiene el código de tu vida (y la fecha de tu muerte) - Bolivia 3.0

  4. Mustansir says:

    Couldn’t find my wife’s and my date if birth in ddmmyyyy format.

  5. Brian W. Moote says:

    First of all, numbers, as in the max number that can be counted is also is also infinite. So the same “everything” is contained in Pi theory as this article mentions also exist in an infinitely number of other things besides just Pi because not only is infinity endless in how continuous it goes, but also in volume, and intensity.

    However, I’d like to say, that if the Planck Length theory in Physics is correct, then Pi is finite, not infinite. Yes, *in calculations* it is likely to be infinite because you can always us math to calculate more. But math becomes vain if it cannot be applied to some form of reality outside of the calculation itself.. (I.E) Applied to the real world; or at least some form of alternate reality if not the one we experience. (1 apple + 1 apple does not = 2 apples if there is no such thing as an actual apple.) –The reason Planck over-rides Pi is quite simple to understand. Pi represents a size obviously. And again, obviously the size constantly gets smaller into a seeming infinity. That is where Planck length comes in; which is 1.616199(97)×10−35. According to highly respected physicist Max Karl Ernst Ludwig Planck, Planck length is so small that nothing else can be smaller. While it seems impossible, consider this: it seems like if you were traveling on an object going the speed of light and tried to throw a ball ahead of you, that ball would go the speed of light+how fast you throw it. But we know from 5th grade science that it is not the case. Most know that even if they do not understand why. Planck length defines a minimum just as Einstein defines a maximum speed. Both of which are hard to understand but have proven to be true. At least according to scientific-math.
    If Pi reaches Planck’s minimum size it cannot get smaller; except for in mathematical calculations. But never in reality. The size of Planck Length is so mind boggling small that it is incomprehensible. But if Pi is mathematically infinite then it will eventually reach Planck length. Of course, Planck could be wrong. But his mathematical formula is solid according to other well known physicist. It’s just not proven. But nether is Pi’s infinity, or the limits of the speed of light. It’s interesting to know that many mathematical formulas are both correct, and incorrect. It all matters in accordance to how it’s applied.

  6. Peter van de Pas says:

    PI is also the sound of a brain thinking.

  7. Phill says:

    So if this is true, is it plausable to say that other infinitely non-repeating numbers could actually have the exact same sequence of numbers, Which just starts at a different point? If nothing else it can’t be ruled out surely?

  8. Jordan says:

    Let think for a while on Pithagoras Theorem c^2 = a^2 + b^2. Replace a=1 and b=1 and draw the triangle on a paper. Let make also the calculation of “c”. Is it possible? No, because root of 2 is a infinite number. Do we have a triangle with sides equal to 1 – yes. What does it means? Something very simple, most people do not think about it. Maths is only a description of the world we live in. Maths and the Numbers and Formulas and Theorems does not create the reality. They only try to describe it on its best way. Does PI contains Britney’s Spears DNA? Probably not, because DNA and PI if compared will show a slight difference at a single digit somewhere. does it matter for Britney – no it doesn’t. The whole point of this discussion is – does the PI sequence contain any ancoding of our reallity. If you want to find any – you probably will, if not, you can reject this thought. It is no more a question of science – it is a question of people acceptance and imagination. Planck’s length is a measure of the smalles atomic bit of anything in the world we live in. Referring to this flow of thoughts, it does not matter to go beyong this limit of calculations, because it will not provide any physical relevant result. Thus, DNA of Britney perhaps is not included 100% in the PI’s sequence, due to a limitation of calculation we set on over PI.

  9. Joey says:

    Brian:
    Whether something is physically possible doesn’t change whether it’s logically possible. The digits of pi may be calculated far enough such that you could measure the circumference of the entire universe (assuming a finite size universe) to within plank length (for sake of argument), which would be a physical limitation on how precise pi could actually be used (which is what I think what you were trying to express), but the digits of pi would just continue on.

    Jordan:

    We aren’t imposing any limits on the precision of pi, since this is not talking about an approximation, but rather the actual value of pi, which is a transcendental number.

  10. I have understood that omega numbers (sensu Chaitin 1975) are truly random infinitely long sequences in some deeper sense than for example pi.

    Also, if I have understood correctly, it has been proven that omega numbers do contain all finite sequences of numbers (Delahaye 2007).

    My problem here:

    1. In a truly random infinite sequence of digits there is always a digit zero somewhere there. True.
    2. In a truly random infinite sequence of digits there are always two zeros in a row somewhere there. True.
    3. In a truly random infinite sequence of digits there are always three trillion and three zeros in a row somewhere there. True.
    4. In a truly random infinite sequence of digits there are always infinite zeros in a row somewhere there. True or false?

    What would be the shortest sequence of only zeros that you can’t find anywhere in truly random infinitely long sequence of numbers? There can’t be such thing, can there?

    So, there are some kind of infinities (like infinite zeros) in truly random infinitely long numbers (like omega) but not all kind of infinities? Which kind of infinities are missing?

    Mikko Kolkkala

    References

    Chaitin, G. J. 1975: A theory of program size formally identical to information theory. J. Assoc. Comput. Mach. 329-340.

    Delahaye, J.-P. 2007: Omega numbers. In: Calude, C. S. (ed.): Randomness and complexity from Leibniz to Chaitin, s. 343-357.

    You can find this book in pdf-format here:
    http://carma.newcastle.edu.au/~jb616/Preprints/Books/Chaitin/calude-book.pdf

    Very interesting book even for a biologist like me.

    Mikko Kolkkala

  11. Thank you Brian W. Moote for your post. Like the nonsensical hare never being able to catch the tortoise proposition, I figured there was a gaping hole in this argument. I’m pleased to have a possible out.

    Otherwise e would be containd within pi and vice versa.

    :)

  12. Feketebv says:

    So the question arises whether a bayesian graph modelled artificial intelligence would be more clever with perfectly the same architecture, if we used PI’s numbers or a vacuum tube’s noise as a random number generator. I.e. if physical coincidence lets God or a soul intervene through Heisenberg’s relationships “backdoor”, meanwhile the mathematical although is entirely deterministic, still may include all the knowledge needed…

  13. George says:

    Maybe I’m not the brightest mathemathician, but isn’t there a contradiction? PI is infinite and does not contain any repating sequences. So what if I want to find a number like 123.123.123 in it? Or, for example 444.444? This would not possible, now would it?

    This would also imply that there is an infinitely large set of numbers which are not contained in PI.

  14. Joey Anetsberger says:

    Mikko, there could be any arbitrarily long string of zeros, but there cannot be an infinitely long string of zeros.

    Suppose there was an infinitely long string of zeros.
    This would mean that at some point in the digits of pi, this infinitely long string of zeros begins but does not terminate (by definition of it being infinite).

    Where would that infinitely long string of zeros begin?

    Let’s consider the set of strings “1″, “11″, “111″, “1111″, “11111″, … , “111…1″.

    Since every possible string of digits exists within the digits of pi, there must be any arbitrarily long string of some length (n) of all ’1′s within the digits of pi.

    A string of n 1s contains n digits, so it must end in at least the nth position (although we know it probably ends far later, this doesn’t matter for this argument’s sake).
    That is, the string “11111111111″, (ten 1s), must end in at least the 10th position in pi.
    The string of one thousand 1s must end in at least the thousandth position in pi.
    etc.

    So, assuming the existence of this string of infinitely many 0s, it would have to begin after all finite length strings of ones have been exhausted, since no other string can be placed after it (it does not terminate).
    There are infinitely many strings of 1 with arbitrary finite length.

    So, even if we begin our infinite string of 0s at position 10^10^10^10^10^10, there would still be at least every string of 1s of that length or longer remaining which are not found in the digits of pi.
    If you give me a starting location for an infinitely long string of zeros, I can always give you a larger string of 1s that has not yet appeared.

    So, there cannot be an infinite string of 0s.

    Also, consider that while there are infinitely many integers to represent the length of your proposed strings of 0s (as given in your example, 1, 2, and 3 trillion 3), these integers always represent finite values. So no matter how long you make a string of zeros, it will always terminate.

  15. Joey Anetsberger says:

    Oops! I mistakenly wrote my last post in regards to the digits of pi, while it should have been about Omega numbers.

    Given that:

    “• Each omega number is a “universal number” in each base: every fi-
    nite sequence of digits is present in it. One could even say that each
    omega number contains every finite sequence of n decimal digits with
    a frequency of 10−n (of course, there is an analogous property in all
    numbering systems). Consequently, for all omega numbers, we know
    that somewhere there is a series of a billion consecutive 0’s (nothing
    like that has been demonstrated for constants such as π and e).”

    I should have said “an omega number” where I wrote “pi”, since it is not necessarily the case that the above holds for pi.

  16. Joey Anetsberger says:

    Alan:

    e would not have to be contained within pi, and pi within e. Note that the property in the OP holds for finite length strings of digits. pi and e are infinitely long, and thus cannot themselves be contained within each other.

  17. Joey Anetsberger says:

    George:
    Pi is infinitely long and does not terminate with a repeating sequence of numbers.
    There may be (and are) sequences within pi that repeat, but those sequences will be followed by something that is not that sequence.

    The string 444444 occurs at position 828499. This string occurs 212 times in the first 200M digits of Pi.
    counting from the first digit after the decimal point. The 3. is not counted.

  18. Emilio says:

    @Mikko

    The probability of a “truly random sequence” (imagine chosing digits at random forever, in such a way that each step is independent of the preceding ones, and each digit has an equal change of coming out each time) having no zeros, no two consecutive zeros, or no consecutive three trillion and three zeros is null in all three cases. This doesn’t mean there are no such sequences (for example the sequence of all 1′s), it just means that if you pick an infinite random sequence at random, you are infinitely more likely to pick one that has your three trillion and three zeros. This of course extends to arbitrary (finite!) sequences.
    This is not true for infinite sequences, actually the opposite holds: the probability of picking a sequence with an infinite number of consecutive zeros (notice this means that the sequence must me all 0 from some point on) is 0.
    So as you correctly noted there is no shortest sequence of only zeros which would not almost surely(= with prob 1) appear in a random sequence, but when passing from finite to infinite length, the probability of finding it jumps from 1 to 0. I didn’t get your last comment about the “missing infinities”, but notice there is no contradiction in the above: there is simply an abrupt change in considering finite or infinite subsequences.

    Returning to the digits of pi, the question of their “randomness” is something else entirely; but as I understand it, if they can be thought of as “random” (although they can be determined by a completely deterministic algorithm) then any finite sequence will appear somewhere, almost surely.

    The textbook you linked looks very interesting, thanks for posting the reference :)

  19. Thank you, Joey and Emilio!

    So:
    “There is any arbitrarily long string of zeros (for example) in π or e” – not known.
    “There is any arbitrarily long string of zeros (for example) in omega” – true.
    “There is an infinitely long string of zeros (for example) in omega” – false.

    I never understood the difference between “arbitrarily long” and “infinitely long”. I suppose the trouble is that you try to apply common sense to infinities and it simply does not work. So good someone can do the math.

    Mikko

  20. How about this:

    “Where would that infinitely long string of zeros begin?”
    -I found it, it begins here…!
    -No, I checked it, quite impressive amoujnt of zeros, but it ends here…
    -Oh yes, sorry. But now I found it, it begins here…!
    -No, that is even longer, but it ends here…
    -Oh yes, sorry. But now I found it…

    We could go on like this “forever”. So, I suppose “forever” here is not an infinitely long time but “just” an arbitrarily long time…?

    (Of course checking the digits of an omega number soon becomes hard work, to say the least…)

  21. Joey Anetsberger says:

    ” “Where would that infinitely long string of zeros begin?”
    -I found it, it begins here…!
    -No, I checked it, quite impressive amoujnt of zeros, but it ends here…
    -Oh yes, sorry. But now I found it, it begins here…!
    -No, that is even longer, but it ends here…
    -Oh yes, sorry. But now I found it… ”

    ——————

    Not quite what I was saying. We’re not concerned with where it ends, because it doesn’t, it’s an infinitely long string of zeros. The point was that since it’s a given property that every finite length string of digits must exist within an omega number, then no matter where you start your infinitely long string of 0s, there are still strings of digits which have not yet appeared in the omega number, specifically, those strings of digits that are of any length equal to where you begin your infinite zeroes, or longer.
    So, there cannot both be a string of zeros of infinite length as well as every finite length string in an omega number. Since we were given that every finite length string of digits appears in an omega number, then we have to conclude that this implies that there cannot be a string of infinitely many 0s.

  22. Emilio says:

    @Mikko

    There is a big difference between saying a random sequence of digits contains an arbitrarily long sequence of consecutive zeros, and to say it contains an infinitely long one. The first assertion means that for all n = 1, 2, 3… there exists a sequence of n consecutive zeros. n can be chosen as large as you want, but the sequence will still be finite! To say there exists an infinite subsequence of consecutive zeros is something else entirely: it means that you will find infinitely many consecutive zeros in the sequence, not just n, for n as large as you want. This is equivalent to saying your sequence will have some finite “prefix” of possibly non consecutive zeros, and then at some point start being zero forever. It is easy to construct an example of a sequence which contains arbitrarily large long sequences of consecutive zeros, but does not contain an infinite one:

    010010001000010000010000001… and so on, interrupting successively longer strings of zeros with ones.

    You can go on forever finding larger and larger sequences of consecutive zeros, but never (even if you had an infinite amount of time) find an infinite one.

    I don’t know anything about omega, but regarding your three statements one could say

    “It is not know whether pi or e contain infinitely long strings of zeros, but statistical evidence strongly suggests that they do (at least in the case of pi).”

    “It is known for sure that pi and e both do not contain an infinite string of consecutive zeros (or else they would be rational!)”

    “A random string of digits will almost certainly(=with probability 1) have an arbitrarily large sequence of zeros.”

    “A random string of digits will almost certainly not have an infinite string of zeros.”

    So maybe the last two statements hold true for omega as well :)

  23. Thanks again Joey and Emilio!

    Especially this “0010010001000010000010000001…” -example made the difference between “arbitrarily long” and “infinitely long” somehow more clear.

    Great summary this:

    Emilio:
    “It is not know whether pi or e contain infinitely long strings of zeros, but statistical evidence strongly suggests that they do (at least in the case of pi).” (A typo here: arbitrarily long, not infinitely?)
    “It is known for sure that pi and e both do not contain an infinite string of consecutive zeros (or else they would be rational!)”
    “A random string of digits will almost certainly(=with probability 1) have an arbitrarily large sequence of zeros.”
    “A random string of digits will almost certainly not have an infinite string of zeros.”

  24. Pingback: Matematiikkaa triviaaleille olennoille (kuten minulle) | Metamaailmankaikkeus

  25. wade says:

    Apologies in advance, just an interloper here, but why doesn’t pi terminate when a zero value occurs?
    And along the same lines using GregoryLeibnitz or Nilakantha, could zero ever occur
    Using these approximators would seem to bend the pi string away from a true value once a number greater than zero pops up in a spot held by zero in other methodf calulation. Once skewed in this way, wouldn’t pi start to become noticeably different among the various methods’ results?
    Thanks
    Dammit trying to do this on a phone is a pain in the ass!

  26. wade says:

    Some words and punctuation got scrambled there.

  27. Pingback: Matematiikkaa triviaaleille olennoille (kuten minulle) | Tiedettä laiskoille

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>