# How Many Zeros in a Row are Possible in Pi?

**URL:** <https://boards.straightdope.com/t/how-many-zeros-in-a-row-are-possible-in-pi/1007562>\
**Category:** Factual Questions\
**Tags:** science-math\
**Created:** [September 21, 2024, 5:12pm UTC](https://boards.straightdope.com/t/how-many-zeros-in-a-row-are-possible-in-pi/1007562 "2024-09-21T17:12:42Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![bleach](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bleach/32/3106_2.png) [@bleach](https://boards.straightdope.com/u/bleach)\
**Post date:** [September 22, 2024, 4:27am UTC](https://boards.straightdope.com/t/how-many-zeros-in-a-row-are-possible-in-pi/1007562/21 "2024-09-22T04:27:20Z")

</div>

For a pretty terrific novelization of this concept, ie., a vast library with an incomprehensible number of books with finite pages and random permutations of characters, check out the novella [A Short Stay in Hell by Steven L. Peck](https://www.goodreads.com/book/show/13456414-a-short-stay-in-hell).

---

<div class="post-metadata">

**Author:** ![Buck\_Godot](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/buck_godot/32/6573_2.png) [@Buck\_Godot](https://boards.straightdope.com/u/Buck_Godot)\
**Post date:** [September 22, 2024, 5:41am UTC](https://boards.straightdope.com/t/how-many-zeros-in-a-row-are-possible-in-pi/1007562/22 "2024-09-22T05:41:33Z")

</div>

Putting it another way, there is no “almost surely” because “almost surely” is a probabilistic concept, while the digits of pi are not random. They are fixed values defined by mathematics. So either the decimal expansion of pi either does contain every finite sequence of digits or it doesn’t.

---

<div class="post-metadata">

**Author:** ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)\
**Post date:** [September 22, 2024, 6:16am UTC](https://boards.straightdope.com/t/how-many-zeros-in-a-row-are-possible-in-pi/1007562/23 "2024-09-22T06:16:56Z")

</div>

> [@bleach](#):
>
> For a pretty terrific novelization of this concept, ie., a vast library with an incomprehensible number of books with finite pages and random permutations of characters, check out the novella [A Short Stay in Hell by Steven L. Peck](https://www.goodreads.com/book/show/13456414-a-short-stay-in-hell).

Eh, why not go and read the original Borges stuff? Which is itself obviously influenced by previous philosophical ideas. However, in any case, those types of libraries contain a finite (and not even _that_ large, as finite numbers go) number of books, while the digits of pi, of course, go on forever.

---

<div class="post-metadata">

**Author:** ![Andy\_L](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@Andy\_L](https://boards.straightdope.com/u/Andy_L)\
**Post date:** [September 22, 2024, 10:56am UTC](https://boards.straightdope.com/t/how-many-zeros-in-a-row-are-possible-in-pi/1007562/24 "2024-09-22T10:56:01Z")

</div>

Yes. I meant “countless” in the casual sense. I should have said something like “more than 10^5000 partial versions of Hamlet”

---

<div class="post-metadata">

**Author:** ![Ynnad](https://avatars.discourse-cdn.com/v4/letter/y/4491bb/32.png) [@Ynnad](https://boards.straightdope.com/u/Ynnad)\
**Post date:** [September 22, 2024, 2:22pm UTC](https://boards.straightdope.com/t/how-many-zeros-in-a-row-are-possible-in-pi/1007562/25 "2024-09-22T14:22:26Z")

</div>

My apologies to **Andy\_L** and **Exapno\_Mapcase**. I was just trying to be super-pedantic, which seems to be encouraged here.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [September 22, 2024, 5:04pm UTC](https://boards.straightdope.com/t/how-many-zeros-in-a-row-are-possible-in-pi/1007562/26 "2024-09-22T17:04:15Z")

</div>

My favorite example of something that’s more likely to be found than the complete text of Hamlet is “The complete text of Hamlet, except Hamlet is renamed Steve”.

---

<div class="post-metadata">

**Author:** ![Lumpy](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lumpy/32/446_2.png) [@Lumpy](https://boards.straightdope.com/u/Lumpy)\
**Post date:** [September 22, 2024, 5:16pm UTC](https://boards.straightdope.com/t/how-many-zeros-in-a-row-are-possible-in-pi/1007562/27 "2024-09-22T17:16:21Z")

</div>

If only because Steve requires one fewer exact string of letters than Hamlet.

I wonder how the search space for these unlikely sequences compares to ginormous numbers such as TREE(3).

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [September 22, 2024, 5:20pm UTC](https://boards.straightdope.com/t/how-many-zeros-in-a-row-are-possible-in-pi/1007562/28 "2024-09-22T17:20:54Z")

</div>

> [@Lumpy](#):
>
> I wonder how the search space for these unlikely sequences compares to ginormous numbers such as TREE(3).

It’s not even close. It’s not even close to being close. It’s not even close to the number of times I’d have to say “close” to accurately describe how close to being close it is.

---

<div class="post-metadata">

**Author:** ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)\
**Post date:** [September 22, 2024, 5:22pm UTC](https://boards.straightdope.com/t/how-many-zeros-in-a-row-are-possible-in-pi/1007562/29 "2024-09-22T17:22:01Z")

</div>

If you are talking about what I think you are talking about, that is a finite number. Whereas pi has infinitely many, non-repeating, digits. So you might be searching for a while. However, for a short text like Hamlet it’s probably not an issue 🙂

---

<div class="post-metadata">

**Author:** ![Lumpy](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lumpy/32/446_2.png) [@Lumpy](https://boards.straightdope.com/u/Lumpy)\
**Post date:** [September 22, 2024, 5:30pm UTC](https://boards.straightdope.com/t/how-many-zeros-in-a-row-are-possible-in-pi/1007562/30 "2024-09-22T17:30:29Z")

</div>

> [@Chronos](#):
>
> It’s not even close. It’s not even close to being close. It’s not even close to the number of times I’d have to say “close” to accurately describe how close to being close it is

But you didn’t say which way.

---

<div class="post-metadata">

**Author:** ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)\
**Post date:** [September 22, 2024, 5:36pm UTC](https://boards.straightdope.com/t/how-many-zeros-in-a-row-are-possible-in-pi/1007562/31 "2024-09-22T17:36:51Z")

</div>

How many words are there in Hamlet? Less than a million? Given a random stream of digits, how long would you expect to search before hitting a given 1000000-digit string? Not _that_ many.

---

<div class="post-metadata">

**Author:** ![pulykamell](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/pulykamell/32/3166_2.png) [@pulykamell](https://boards.straightdope.com/u/pulykamell)\
**Post date:** [September 22, 2024, 5:39pm UTC](https://boards.straightdope.com/t/how-many-zeros-in-a-row-are-possible-in-pi/1007562/32 "2024-09-22T17:39:25Z")

</div>

Yeah. Which is bigger, because I’m not sure? TREE(3), right?

---

<div class="post-metadata">

**Author:** ![Pasta](https://avatars.discourse-cdn.com/v4/letter/p/ecccb3/32.png) [@Pasta](https://boards.straightdope.com/u/Pasta)\
**Post date:** [September 22, 2024, 5:41pm UTC](https://boards.straightdope.com/t/how-many-zeros-in-a-row-are-possible-in-pi/1007562/33 "2024-09-22T17:41:50Z")

</div>

> [@Buck\_Godot](#):
>
> Putting it another way, there is no “almost surely” because “almost surely” is a probabilistic concept, while the digits of pi are not random. They are fixed values defined by mathematics. So either the decimal expansion of pi either does contain every finite sequence of digits or it doesn’t.

There are a [lot of worms](https://en.wikipedia.org/wiki/Probability_interpretations) in that can. Too hijacky for this thread, but probability can certainly be defined and applied to something like the digits of pi, depending on the interpretational framework you want to adopt.

---

<div class="post-metadata">

**Author:** ![Gyrate](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/gyrate/32/3588_2.png) [@Gyrate](https://boards.straightdope.com/u/Gyrate)\
**Post date:** [September 22, 2024, 5:48pm UTC](https://boards.straightdope.com/t/how-many-zeros-in-a-row-are-possible-in-pi/1007562/34 "2024-09-22T17:48:16Z")

</div>

> [@Chronos](#):
>
> My favorite example of something that’s more likely to be found than the complete text of Hamlet is “The complete text of Hamlet, except Hamlet is renamed Steve”.

Here are a few more fun options:

[http://www.brunching.com/randommonkeys.html](http://www.brunching.com/randommonkeys.html)

---

<div class="post-metadata">

**Author:** ![Ludovic](https://avatars.discourse-cdn.com/v4/letter/l/7ab992/32.png) [@Ludovic](https://boards.straightdope.com/u/Ludovic)\
**Post date:** [September 22, 2024, 5:48pm UTC](https://boards.straightdope.com/t/how-many-zeros-in-a-row-are-possible-in-pi/1007562/35 "2024-09-22T17:48:58Z")

</div>

> [@pulykamell](#):
>
> Yeah. Which is bigger, because I’m not sure? TREE(3), right?

Pretty sure it’s TREE(3), because TREE(3) is quite larger than Graham’s Number, and Graham’s Number itself is too small to be written in the universe with only power towers (i.e. 3^3^3^3…etc.)

Whereas the probability of any given book could probably be something like 1/30^(number of characters in the book). Which isn’t even a power tower let alone one that cannot be written in the entire universe.

---

<div class="post-metadata">

**Author:** ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)\
**Post date:** [September 22, 2024, 5:55pm UTC](https://boards.straightdope.com/t/how-many-zeros-in-a-row-are-possible-in-pi/1007562/36 "2024-09-22T17:55:12Z")

</div>

The worst case is a run of, say, a million, zeros, but (probably…) that only takes 10^{10^6}+10^{10^6-1}+\cdots digits or so to randomly occur, if I am not mistaken.

---

<div class="post-metadata">

**Author:** ![Lumpy](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lumpy/32/446_2.png) [@Lumpy](https://boards.straightdope.com/u/Lumpy)\
**Post date:** [September 22, 2024, 5:57pm UTC](https://boards.straightdope.com/t/how-many-zeros-in-a-row-are-possible-in-pi/1007562/37 "2024-09-22T17:57:45Z")

</div>

Okay, I’ve thought about it some more: if it takes one million decimal digits to encode “Hamlet”, then an infinite normal string would have “Hamlet” occur on average 1/101,000,000 of the time. If you searched 101,000,000 such 101,000,000-long strings, you would have about a 36% (1/e) chance of finding it. That’s _ **trivial** _ compared to TREE(3).

---

<div class="post-metadata">

**Author:** ![pulykamell](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/pulykamell/32/3166_2.png) [@pulykamell](https://boards.straightdope.com/u/pulykamell)\
**Post date:** [September 22, 2024, 5:59pm UTC](https://boards.straightdope.com/t/how-many-zeros-in-a-row-are-possible-in-pi/1007562/38 "2024-09-22T17:59:48Z")

</div>

Oh duh. That’s so obvious now.

---

<div class="post-metadata">

**Author:** ![Wendell\_Wagner](https://avatars.discourse-cdn.com/v4/letter/w/8491ac/32.png) [@Wendell\_Wagner](https://boards.straightdope.com/u/Wendell_Wagner)\
**Post date:** [September 22, 2024, 6:21pm UTC](https://boards.straightdope.com/t/how-many-zeros-in-a-row-are-possible-in-pi/1007562/39 "2024-09-22T18:21:04Z")

</div>

> [@DPRK](#):
>
> How many words are there in Hamlet?

30,557, according to [Hamlet - Shakespeare's Plays Available in Streaming - Research Guides at University of Southern California](https://libguides.usc.edu/c.php?g=1046001&p=7618813) .

---

<div class="post-metadata">

**Author:** ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)\
**Post date:** [September 22, 2024, 6:39pm UTC](https://boards.straightdope.com/t/how-many-zeros-in-a-row-are-possible-in-pi/1007562/40 "2024-09-22T18:39:01Z")

</div>

Thanks. I did not specify exactly how the text is to be encoded as decimal digits, but even if it takes more than a million, it will not be orders of magnitude more.

[Previous page](https://boards.straightdope.com/t/how-many-zeros-in-a-row-are-possible-in-pi/1007562.md?page=1)

[Next page](https://boards.straightdope.com/t/how-many-zeros-in-a-row-are-possible-in-pi/1007562.md?page=3)
