$\pi$ Pi

Pi is an infinite, nonrepeating $($sic$)$ 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 the great questions of the universe.

Is this true? Does it make any sense ?

  • 122
    $\begingroup$ This is unknown. All that is known about $\pi$ is that it is transcendental. askamathematician.com/2009/11/… $\endgroup$
    – picakhu
    Commented Oct 18, 2012 at 14:38
  • 27
    $\begingroup$ This is the assertion that $\pi$ is base $8$ normal. Whether it is true is not known. But it is known that "most" numbers are normal to every base. $\endgroup$ Commented Oct 18, 2012 at 14:40
  • 113
    $\begingroup$ It's not just the assertion that $\pi$ is normal. It also asserts that it is normal because its expansions is infinite and nonrepeating. And that's just plain false. $\endgroup$ Commented Oct 18, 2012 at 14:41
  • 57
    $\begingroup$ What is certain, is that the 94 first digits of pi do indeed contain the answer to all the great questions of the universe $\endgroup$
    – mivk
    Commented Oct 18, 2012 at 15:36
  • 29
    $\begingroup$ The assertion is strictly weaker than normality. It only says each string occurs once. This implies infinitely many occurrences but not equidistribution. $\endgroup$
    – Erick Wong
    Commented Oct 18, 2012 at 17:44

12 Answers 12


It is not true that an infinite, non-repeating decimal must contain ‘every possible number combination’. The decimal $0.011000111100000111111\dots$ is an easy counterexample. However, if the decimal expansion of $\pi$ contains every possible finite string of digits, which seems quite likely, then the rest of the statement is indeed correct. Of course, in that case it also contains numerical equivalents of every book that will never be written, among other things.

  • 835
    $\begingroup$ I'll bet this answer is in there too. $\endgroup$ Commented Oct 19, 2012 at 2:02
  • 26
    $\begingroup$ @makerofthings7: Yes, a representation of the entire internet would be in there too. Every representation, in fact. $\endgroup$ Commented Oct 19, 2012 at 2:34
  • 90
    $\begingroup$ Why does it seem likely, that the decimal expansion of π contains every possible finite string of digits? $\endgroup$
    – Alex
    Commented Oct 19, 2012 at 9:53
  • 90
    $\begingroup$ @Alex: there's no particular reason for the digits of $\pi$ to have any special pattern to them, so mathematicians expect that the digits of $\pi$ more or less "behave randomly," and a random sequence of digits contains every possible finite string of digits with probability $1$ by Borel's normal number theorem: en.wikipedia.org/wiki/Normal_number#Properties_and_examples $\endgroup$ Commented Oct 19, 2012 at 16:52
  • 25
    $\begingroup$ @Mariano: Oh, there’s a book that someone ought to write: Borges in Asgard! :-) $\endgroup$ Commented Oct 21, 2012 at 9:45

Let me summarize the things that have been said which are true and add one more thing.

  1. $\pi$ is not known to have this property, but it is expected to be true.
  2. This property does not follow from the fact that the decimal expansion of $\pi$ is infinite and does not repeat.

The one more thing is the following. The assertion that the answer to every question you could possibly want to ask is contained somewhere in the digits of $\pi$ may be true, but it's useless. Here is a string which may make this point clearer: just string together every possible sentence in English, first by length and then by alphabetical order. The resulting string contains the answer to every question you could possibly want to ask, but

  • most of what it contains is garbage,
  • you have no way of knowing what is and isn't garbage a priori, and
  • the only way to refer to a part of the string that isn't garbage is to describe its position in the string, and the bits required to do this themselves constitute a (terrible) encoding of the string. So finding this location is exactly as hard as finding the string itself (that is, finding the answer to whatever question you wanted to ask).

In other words, a string which contains everything contains nothing. Useful communication is useful because of what it does not contain.

You should keep all of the above in mind and then read Jorge Luis Borges' The Library of Babel. (A library which contains every book contains no books.)

  • 27
    $\begingroup$ "So finding this location is exactly as hard as finding the string itself" - indeed, rather harder: if I know how long a message is, I have an upper bound on the inormation contained in the encoding. But I have no upper bound on the information needed to represent the index into any given normal number. $\endgroup$ Commented Oct 19, 2012 at 12:06
  • 16
    $\begingroup$ What if you layout all the sentences in order of usefulness? :P $\endgroup$
    – naught101
    Commented Oct 21, 2012 at 5:55
  • 5
    $\begingroup$ @corsiKa: what I'm saying is that the location of a message in $\pi$ is itself information, and that location doesn't come for free. Trying to communicate information by pointing to where it is in $\pi$ constitutes an extremely inefficient encryption algorithm. $\endgroup$ Commented Dec 1, 2012 at 3:16
  • 4
    $\begingroup$ @didibus Not really, because natural language satisfies a form of Turing-completeness: you could just say "The answer to problem X is, in binary, one one zero one ..." and proceed to give a binary encoding of a description of your "improved" language followed by an encoding of the message itself. Thus any other Turing-complete language can be delivered in English (and most other natural languages in use). $\endgroup$ Commented Feb 5, 2014 at 14:13
  • 4
    $\begingroup$ finding this location is exactly as hard as finding the string itself That's not true: there is a number called $\hat{\pi}$ which is the index for reading the answers in $\pi$ ;-p $\endgroup$ Commented Feb 15, 2017 at 14:42

It is widely believed that $\pi$ is a normal number. This (or even the weaker property of being disjunctive) implies that every possible string occurs somewhere in its expansion.

So yes, it has the story of your life -- but it also has many false stories, many subtly wrong statements, and lots of gibberish.

  • 310
    $\begingroup$ And you wouldn't believe the terrible spelling. $\endgroup$ Commented Oct 18, 2012 at 19:33
  • 9
    $\begingroup$ @SydKerckhove: It's normal in the sense that almost all numbers have this property. Numbers like 7 and 4/3 that lack this property are very rare indeed (though still infinite). $\endgroup$
    – Charles
    Commented Jan 30, 2015 at 17:21
  • 1
    $\begingroup$ @Charles Errr.. It's normal in the sense that the digits are distributed uniformly. $\endgroup$
    – MickLH
    Commented Feb 17, 2017 at 22:24
  • 5
    $\begingroup$ @MickLH But the reason that the property is called "normal" rather than, say, "weird" is that it occurs in a measure 1 subset of the reals. $\endgroup$
    – Charles
    Commented Feb 18, 2017 at 1:33
  • $\begingroup$ @Charles is it known whether the set of normal numbers is measurable or not? $\endgroup$
    – maritsm
    Commented Jun 28, 2023 at 16:09

According to Mathematica, when $\pi$ is expressed in base 128 (whose digits can therefore be interpreted as ASCII characters),

  • "NO" appears at position 702;

  • "Yes" appears at position 303351.

Given (following Feynman in his Lectures on Physics) that any question $A$ with possible answer $A'$ (correct or not) can be re-expressed in the form "Is $A'$ a correct answer to $A$?", and that such questions have either "no" or "yes" answers, this proves the second sentence of the claim--and shows just how empty an assertion it is. (As others have remarked, the first sentence--depending on its interpretation--is either wrong or has unknown truth value.)


pNO = FromCharacterCode[RealDigits[\[Pi], 128, 710]];
pYes = FromCharacterCode[RealDigits[\[Pi], 128, 303400]];
{StringPosition[pNO, "NO"], StringPosition[pYes, "Yes"]}

{{{{702, 703}}, {}}, {{{303351, 303353}}, {}}}

  • 13
    $\begingroup$ Please advise: where does 'pi' or 'π' occur? $\endgroup$
    – QED
    Commented Oct 19, 2012 at 2:53
  • 3
    $\begingroup$ Is it true 'that any question A with possible answer A′ (correct or not) can be re-expressed in the form "Is A′ a correct answer to A?"' Does that reduce the "all the great questions of the universe" to some inferior subset? I don't know, just asking. $\endgroup$
    – LarsH
    Commented Oct 19, 2012 at 9:56
  • 5
    $\begingroup$ @LarsH That's a good question--but it starts to push us more into philosophy than mathematics. This re-expression of every great question as a yes-no question requires that you accept that every such question does have a definite answer and that you also accept the Law of the Excluded Middle. $\endgroup$
    – whuber
    Commented Oct 19, 2012 at 13:40
  • 1
    $\begingroup$ @psoft I do not understand your question. One possible interpretation is that you are asking where the string "pi" occurs. The first occurrence, up to case, is at position 566, where "PI" is seen. In general, if $\pi$ is indeed locally normal, then we would expect to see any $k$-digit string (up to case) appear approximately within the first $128^k / 2^k$ = $2^{6k}$ positions. For $k=2$ that's $2^{12}$=$4096$ and for $k=3$ that's $2^{18}\approx 250000$. These estimates are consistent with what we have seen for "no", "pi", and "yes". Finding a given 5+ character string may be difficult! $\endgroup$
    – whuber
    Commented Oct 19, 2012 at 13:46
  • 13
    $\begingroup$ @Lars I was just riffing off Feynman, not quoting him. What he actually said is that there likely is a single equation describing all the laws of physics. As I recall, just collect all the basic equations of physical law (presumably finite in number), express them each in the form $u_i=0$, and then write $\sum_i |u_i|^2 = 0$. This trivial re-expression of things that look complicated into something superficially looking much simpler was my motivation for arguing all the great questions of life can be made into yes-no questions. $\endgroup$
    – whuber
    Commented Oct 19, 2012 at 20:43

This is an open question. It is not yet known if $\pi$ is a normal number.


  • 9
    $\begingroup$ or even disjunctive. $\endgroup$
    – LarsH
    Commented Oct 19, 2012 at 19:57

Whether or not it's true, it's absolutely useless.

Imagine finding your life story: a copiously documented and flawless recounting of every day of your life... right up until yesterday where it states that you died and abruptly reverts back to gibberish. If pi truly contains every possible string, then that story is in there, too. Now, imagine if it said you die tomorrow. Would you believe it, or keep searching for the next copy of your life story?

The problem is that there is no structure to the information. It would take a herculean effort to process all of that data to get to the "correct" section, and immense wisdom to recognize it as correct. So if you were thinking of using pi as an oracle to determine these things, you might as well count every single atom that comprises planet Earth. That should serve as a nice warm up.

  • 49
    $\begingroup$ nb. if it is true, then you can justify any rambling, gibberish, or errors with the excuse, "I was just quoting pi". $\endgroup$
    – Dan Burton
    Commented Oct 18, 2012 at 22:41
  • 12
    $\begingroup$ It has the use of getting people interested in mathematics (e.g. it motivated this question). $\endgroup$ Commented Oct 19, 2012 at 0:27
  • 5
    $\begingroup$ @DouglasS.Stones I agree, it does provoke interest in mathematics. $\endgroup$
    – Chani
    Commented Oct 19, 2012 at 5:03
  • 6
    $\begingroup$ It would also take about the same amount of information to specify the location that an arbitrary string starts in pi at as the string contains. $\endgroup$ Commented Oct 19, 2012 at 8:05
  • 8
    $\begingroup$ I doubt anybody expects to get any information about their life from π. It's just an interesting way to imagine infinity. $\endgroup$
    – redbmk
    Commented Oct 19, 2012 at 17:22

In general it it not true that an "infinite non-repeating decimal" contains any sequence in it. Consider for example the number $0.01001000100001000001000000100000001...$.

However, it is not known if $\pi$ does contain every sequence.

  • $\begingroup$ It can't be known if ANY sequence contains all possible combinations of numbers, as that is infinite and unreachable. $\endgroup$
    – Ky -
    Commented Oct 21, 2012 at 6:52
  • 22
    $\begingroup$ @Supuhstar unless the sequence is specifically defined with that in mind, like by concatenating numbers consecutively: $0.12345678910111213141516...$ $\endgroup$ Commented Oct 22, 2012 at 16:47

This is False. Claim: Infinite and Non-Repeating, therefore must have EVERY combination.

Counterexample: $0.01001100011100001111\ldots$
This is infinite and non-repeating yet does not have every combination.

Just because something is infinite and non-repeating doesn't mean it has every combination.

Pi may indeed have every combination but you cant use this claim to say that it does.


Challenge accepted. In the following file are the first 1,048,576 digits (1 Megabyte) of pi (including the leading 3) converted to ANSI (with assistance from the algorithm described in https://stackoverflow.com/questions/12991606/):


  • 2
    $\begingroup$ @MarkHurd someone should try running it :3 $\endgroup$
    – Ky -
    Commented May 7, 2016 at 15:16
  • 2
    $\begingroup$ someone already ran it $\endgroup$ Commented Jul 22, 2016 at 18:58
  • 8
    $\begingroup$ and.. we are the running code effects, living in a matrix-like universe simulation, encoded in pi. $\endgroup$ Commented Jul 26, 2016 at 12:43
  • 2
    $\begingroup$ But at which position does "every possible number combination" appear? $\endgroup$ Commented Jun 5, 2020 at 19:04
  • 2
    $\begingroup$ So in these million digits how many words of four or more letter appear? Much less, anything resembling a sentence? $\endgroup$ Commented Mar 9, 2022 at 16:13

And even if your statement is true with $\pi$, it does not make $\pi$ special. If we hit a real number at random, with probability $1$ we will hit a normal number. That is "almost all" real number is like that. The set of not-normal numbers have Lebesgue measure zero.

  • 9
    $\begingroup$ How do you know that the set of non-normal numbers is Lebesgue measurable? $\endgroup$
    – celtschk
    Commented Jul 12, 2015 at 8:29
  • 5
    $\begingroup$ Please give a cite, or literature for that answer!!!!! It is a big deal to say something like that. $\endgroup$ Commented Feb 15, 2017 at 14:36
  • 1
    $\begingroup$ I found a cite for this result, but I can't say if it is acurete or not: math.boku.ac.at/udt/vol09/no2/06filsus.pdf $\endgroup$ Commented Feb 15, 2017 at 15:05

I believe the statement could be worded more accurately. Given the reasonable assumption that PI is infinitely non repeating, it doesn't follow that it would actually incude any particular sequence.

Take this thought experiment as an analogy. Imagine you had to sit in a room for all eternity sayings words, without every ever uttering the same word twice. You would very soon find yourself saying very long words. But there's no logical reason why you should have to use up all the possible short words first. In fact you could systematically exclude the words "yes" or every word containing the letter "y", or any other arbitrary subset of the infinite set of possible words.

Same goes for digit sequences in PI. It's highly probably that any conceivable sequence can be found in PI if you calculate for long enough, but it's not guaranteed by the prescribed conditions.


That image contains a number of factual errors, but the most important one is the misleading assertion that irrationality implies disjunctiveness.

One can easily construct an non-disjunctive, irrational number. Let $ r = \sum\limits_{n = 0}^\infty 2^{-n} \begin{cases} 1 & \text{if } 2 | n \\ s_n & \text{else} \end{cases} $ for any non-periodic sequence $ s_n \in \{0,1\} $.

It is not known whether $ \pi $ is, in fact, disjunctive (or even normal).


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .