Decimal Expansion of Pi

The claim is only about finite strings (and apart from this, it is only conjectured, has not been proven). In fact your what-if argument is sound and would show that $\pi$ is rational. The fact that it is not rational (in fact, transcendental) shows that it cannot contain itself in a nontrivial manner.

Regarding the second question: No, all finite strings does not imply a given infinite string. In fact, the number $$0.123456789101112131415161718192021222324\ldots $$ obtained by concatenating all natural numbers provably contains every finite string, and among these $3$, $31$, $314$, $3141$ and so on, but certainly (though perhaps not obviously) not the full expansion of $\pi$.


There are a number of observations that would lead to the conclusion that having every finite string as a substring is totally different from having every infinite string as a substring.

Firstly, "$100111000011111000000...$" contains (as a substring) every finite string consisting of only ones or only zeroes, but it does not contain the infinite strings consisting of only ones or only zeroes.

Secondly, concatenating all positive integers yields "$12345678910111213...$" that contains every positive integer but does not contain the infinite string "$0000...$" because every positive integer has finitely many zeroes. This is a much easier statement to verify than Hagen's claim that it does not contain $π$.

Thirdly, the number of substrings that a string contains is countable, and the number of infinite strings is uncountable, so any given string will not contain almost all infinite strings.

Fourthly, your attempt to justify your hypothesis is logically flawed in a crucial way. If an infinite string $x$ contains every finite string, it means:

  For every finite string $y$:

    For some position $p$:

      $y$ occurs in $x$ at position $p$.

It does not imply:

  For some position $p$:

    For every finite string $y$:

      $y$ occurs in $x$ at position $p$.

which is what you would need to conclude that:

  For some position $p$:

    $π$ occurs in $x$ at position $p$.

This switching of quantifiers is an extremely common logical error but it should be very obvious if you wrote it out the way I did.


A short an concise answer is the following:

$\pi$ is a non-repeating irrational number. If you were to find a subset that contains all the digits of $\pi$, that would mean the digit sequence UP TO THAT POINT would be identical to the sequence starting from that point onwards. Until you get to the same point inside that subset, where a further subset identical to that starts. Therefore, $\pi$ would start being repetitive from that point on, to infinity. Since $\pi$ is non-repeating, that cannot be true. Therefore there isn't such a point. (see https://i.stack.imgur.com/Xazkv.png)

If you want to do the some "experimental math" you can search through the digits of $\pi$ for sequences of $\pi$ with your browser here:

  • http://www.eveandersson.com/pi/digits/10000
  • http://www.eveandersson.com/pi/digits/100000
  • http://www.eveandersson.com/pi/digits/1000000

The results are for

10000 digits:

3:  975 hits
31: 91 hits
314: 16 hits
3141: 1 hits

100000 digits:

3:  10028 hits
31: 966 hits
314: 92 hits
3141: 8 hits
31415: 1 hits

1000000 digits:

3 : 100230 hits 
31: 9758 hits 
314: 971 hits 
3141: 89 hits 
31415: 8 hits 
314159 : 1 hit

So one could come up with the following "law": To find a sequence of $\pi$ with $n$ digits inside $\pi$ itself, you need about $10^n$ digits of $\pi$. So to find the $\infty$ digits of $\pi$ you would need $10^{\infty}$ digits of pi, which should convince you, that you should not try to do that with your browser.