# What texts or images have we found in pi?

**URL:** <https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378>\
**Category:** Factual Questions\
**Created:** [May 27, 2014, 3:45pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378 "2014-05-27T15:45:36Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![hajario](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/hajario/32/171_2.png) [@hajario](https://boards.straightdope.com/u/hajario)\
**Post date:** [May 27, 2014, 11:28pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/41 "2014-05-27T23:28:38Z")

</div>

> [@hajario](#):
>
> This is interesting.
> 
> Has every possible three digit sequence been found? Four?
> 
> What is the longest string of the same number consecutive? The same number however many times in a row might be where the idea that every possible sequence will come out eventually. Can we know what is the theoretical longest possible string of the same number in a consecutively?

In the first 200 million digits of PI:

There is at least one occurrence of eight in a row for 0, 1, 2, 3, 4, 5 and 9.  
There is at least one occurrence of nine in a row for 6, 7 and 8.  
There are none for ten in a row.

“12345678” shows up once as well as “01234567” and “23456789”

My birthday in MMDDYYYY shows up five times.

I was surprised by some of this but I shouldn’t have been because of how large 200 million is.

There is a 99.995% chance of finding any seven digit number. There are a very small number of six digit sequences not found.

This is a cool page: [The Pi-Search Page](http://www.angio.net/pi/piquery.html)

---

<div class="post-metadata">

**Author:** ![flatlined](https://avatars.discourse-cdn.com/v4/letter/f/eb9ed0/32.png) [@flatlined](https://boards.straightdope.com/u/flatlined)\
**Post date:** [May 28, 2014, 12:46am UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/42 "2014-05-28T00:46:50Z")

</div>

If you are a bored, stoned geek and you convert Pi to binary and then move the strings of numbers around enough…you can make a picture of a big eyed alien. As I recall, I also found a cat and an elephant. While I’m still a geek, I’m not bored or stoned enough to do it again.

---

<div class="post-metadata">

**Author:** ![j\_sum1](https://avatars.discourse-cdn.com/v4/letter/j/8baadc/32.png) [@j\_sum1](https://boards.straightdope.com/u/j_sum1)\
**Post date:** [May 28, 2014, 2:04am UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/43 "2014-05-28T02:04:04Z")

</div>

Further to **hajario** ’s post  
I recall reading that the sequence 0123456789 has not been discovered yet. (Probably in David Wells book “curious and interesting numbers”)

---

<div class="post-metadata">

**Author:** ![D18](https://avatars.discourse-cdn.com/v4/letter/d/c57346/32.png) [@D18](https://boards.straightdope.com/u/D18)\
**Post date:** [May 28, 2014, 2:42am UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/44 "2014-05-28T02:42:18Z")

</div>

> [@Omar\_Little](#):
>
> I remember reading about this phenomena in a scientific research magazine while waiting in a doctor’s office a few years back. The researchers, mainly graduate students from MIT, I think, had discovered bit string that translated into an image that eerily resembled Richard Nixon. Here’s a link to the image: [LINK](https://www.youtube.com/watch?v=dQw4w9WgXcQ).

This link just takes me to a nauseating music video!

---

<div class="post-metadata">

**Author:** ![Omar\_Little](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/omar_little/32/269_2.png) [@Omar\_Little](https://boards.straightdope.com/u/Omar_Little)\
**Post date:** [May 28, 2014, 4:35am UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/45 "2014-05-28T04:35:43Z")

</div>

> [@D18](#):
>
> This link just takes me to a nauseating music video!

Whooooooooooooooshhh!!!

---

<div class="post-metadata">

**Author:** ![Leo\_Bloom](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/leo_bloom/32/10377_2.png) [@Leo\_Bloom](https://boards.straightdope.com/u/Leo_Bloom)\
**Post date:** [May 28, 2014, 5:07am UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/46 "2014-05-28T05:07:59Z")

</div>

> [@Chronos](#):
>
> Yes, I’m aware that this all depends on the encoding scheme used, which is precisely why I specified a coding scheme. I could have picked any of a great number of encodings, but chose ASCII because it’s the most standard way of converting text to numbers. In any event, the encoding must be chosen before you start searching, or you can just say after the fact that you’re picking an encoding where “14” means the text of the complete works of Shakespeare…

You told it wrong.

There. That makes up for me not getting some of the other jokes, except for the alcohol of course.

---

<div class="post-metadata">

**Author:** ![Leo\_Bloom](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/leo_bloom/32/10377_2.png) [@Leo\_Bloom](https://boards.straightdope.com/u/Leo_Bloom)\
**Post date:** [May 28, 2014, 5:09am UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/47 "2014-05-28T05:09:40Z")

</div>

> [@flatlined](#):
>
> If you are a bored, stoned geek and you convert Pi to binary and then move the strings of numbers around enough…you can make a picture of a big eyed alien. As I recall, I also found a cat and an elephant. While I’m still a geek, I’m not bored or stoned enough to do it again.

These great username/post combos just never stop…

---

<div class="post-metadata">

**Author:** ![Senegoid](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/senegoid/32/6606_2.png) [@Senegoid](https://boards.straightdope.com/u/Senegoid)\
**Post date:** [May 28, 2014, 7:40am UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/48 "2014-05-28T07:40:40Z")

</div>

> [@Chronos](#):
>
> I think that one reason people are so fascinated by finding things in pi (or other irrational numbers, but pi is the best-known irrational number) is that they think that it would represent a data compression scheme.

If we made a ZIP file of pi, how compressed would that be? Would it still be infinitely long? 🙂

> [@robert\_columbia](#):
>
> Now I want a drink, alcoholic of course, after the heavy chapters involving quantum mechanics.

Well-known and much-quoted poem for pi to 30 places:

> [@](#):
>
> Now I, even I, would celebrate  
> In rhymes unapt, the great  
> Immortal Syracusan, rivaled nevermore,  
> Who in his wondrous lore,  
> Passed on before,  
> Left men his guidance  
> How to circles mensurate.

[Another one:](http://www.onlinemathlearning.com/mnemonics-for-geometry.html)

> [@Michael Shapiro](#):
>
> Now I will a rhyme construct  
> By chosen words the young instruct.  
> Cunningly devised endeavour,  
> Con it and remember ever.  
> Widths of circle here you see.  
> Sketched out in strange obscurity.

How about a poem for pi to 740 decimal places? [See here.](http://www.uoguelph.ca/~pjf/Pi/pi.mnemonic.extrordinaire.html) (It has some quirks, explained on the page there – for example, the digit 0 is encoded with a 10-letter word, and words of more than 10 letters encode two consecutive digits.)

---

<div class="post-metadata">

**Author:** ![psychonaut](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/psychonaut/32/4655_2.png) [@psychonaut](https://boards.straightdope.com/u/psychonaut)\
**Post date:** [May 28, 2014, 8:31am UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/49 "2014-05-28T08:31:12Z")

</div>

> [@Senegoid](#):
>
> How about a poem for pi to 740 decimal places? [See here.](http://www.uoguelph.ca/~pjf/Pi/pi.mnemonic.extrordinaire.html) (It has some quirks, explained on the page there – for example, the digit 0 is encoded with a 10-letter word, and words of more than 10 letters encode two consecutive digits.)

There’s an even longer mnemonic by Mike Keith, the recreational mathematician/linguist I mentioned upthread. His [Cadaeic Cadenza](https://en.wikipedia.org/wiki/Cadaeic_Cadenza) encodes the first 3835 digits of pi, and also mimics portions of famous works by Shakespeare, Edgar Allen Poe, Lewis Carroll, T. S. Eliot, and others. The first part, “Near A Raven”, is the most famous; it begins:

> [@](#):
>
> Poe, E.  
> Near a Raven
> 
> Midnights so dreary, tired and weary,  
> Silently pondering volumes extolling all by-now obsolete lore.  
> During my rather long nap - the weirdest tap!  
> An ominous vibrating sound disturbing my chamber’s antedoor.  
> “This”, I whispered quietly, “I ignore”.

---

<div class="post-metadata">

**Author:** ![Colophon](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@Colophon](https://boards.straightdope.com/u/Colophon)\
**Post date:** [May 28, 2014, 9:59am UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/50 "2014-05-28T09:59:05Z")

</div>

> [@Yllaria](#):
>
> I’m not sure what that result means. Does it mean that the string “5318008” begins at digit 2,729,541,692 of pi? Is that including the initial 3?

That’s the position in the binary representation of pi.

(And with a binary pi, you only have two choices: you can have one bit of pi, or no bits of pi.)

---

<div class="post-metadata">

**Author:** ![Dana\_Scully](https://avatars.discourse-cdn.com/v4/letter/d/5daacb/32.png) [@Dana\_Scully](https://boards.straightdope.com/u/Dana_Scully)\
**Post date:** [May 28, 2014, 2:05pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/51 "2014-05-28T14:05:59Z")

</div>

> [@Omar\_Little](#):
>
> I remember reading about this phenomena in a scientific research magazine while waiting in a doctor’s office a few years back. The researchers, mainly graduate students from MIT, I think, had discovered bit string that translated into an image that eerily resembled Richard Nixon. Here’s a link to the image: [LINK](https://www.youtube.com/watch?v=dQw4w9WgXcQ).

I’ve been Rick Rolled! 😃

---

<div class="post-metadata">

**Author:** ![AHunter3](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ahunter3/32/368_2.png) [@AHunter3](https://boards.straightdope.com/u/AHunter3)\
**Post date:** [May 28, 2014, 3:11pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/52 "2014-05-28T15:11:17Z")

</div>

The notion that _if_ pi is infinite it _therefore_ contains every combination possible–that somewhere in its infinite length there will be the complete words of Shakespeare and so on-- is flawed.

There is more than one variety of infinity under consideration here and it is wrong to assume that infinity = infinity. The set of every possible combination of numerical characters is a level of infinity that is higher than the level of infinity that the infinite length of characters constituting pi.

Hence, pi can be infinitely long, never repeating itself, without in any way exhausting the entire range of possible numerical character-strings. And hence there are possible numerical character-strings (an infinite number of them, in fact) that do not, in fact, occur anywhere within the infinite string of characters that constitutes pi.

---

<div class="post-metadata">

**Author:** ![D18](https://avatars.discourse-cdn.com/v4/letter/d/c57346/32.png) [@D18](https://boards.straightdope.com/u/D18)\
**Post date:** [May 28, 2014, 3:30pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/53 "2014-05-28T15:30:12Z")

</div>

> [@Omar\_Little](#):
>
> Whooooooooooooooshhh!!!

Fair enough! I thought that might be the case, but usually in a SDMB whoosh there is a subtle wit at play. I just don’t get the joke. So if any of you smarter dopers would like to fill me in, I’d be grateful.

---

<div class="post-metadata">

**Author:** ![cmyk](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/cmyk/32/3353_2.png) [@cmyk](https://boards.straightdope.com/u/cmyk)\
**Post date:** [May 28, 2014, 3:32pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/54 "2014-05-28T15:32:20Z")

</div>

> [@D18](#):
>
> Fair enough! I thought that might be the case, but usually in a SDMB whoosh there is a subtle wit at play. I just don’t get the joke. So if any of you smarter dopers would like to fill me in, I’d be grateful.

[Rickrolling.](http://en.wikipedia.org/w/index.php?title=Rickrolling)

---

<div class="post-metadata">

**Author:** ![D18](https://avatars.discourse-cdn.com/v4/letter/d/c57346/32.png) [@D18](https://boards.straightdope.com/u/D18)\
**Post date:** [May 28, 2014, 3:35pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/55 "2014-05-28T15:35:00Z")

</div>

Well, I’ll be damned! I did not know that!

---

<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:** [May 28, 2014, 3:35pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/56 "2014-05-28T15:35:08Z")

</div>

> [@](#):
>
> Quoth **Senegoid** :
> 
> If we made a ZIP file of pi, how compressed would that be? Would it still be infinitely long? 🙂

If you mean using the actual ZIP compression algorithm specifically, it would probably remain infinite, since it’s not the sort of pattern that that algorithm was designed to compress. If, on the other hand, you’re asking about compression in general, one could write a fairly short program which could keep generating digits of pi indefinitely, and thus achieve an effectively infinite compression ratio.

> [@](#):
>
> Quoth **AHunter3** :
> 
> The notion that if pi is infinite it therefore contains every combination possible–that somewhere in its infinite length there will be the complete words of Shakespeare and so on-- is flawed.
> 
> There is more than one variety of infinity under consideration here and it is wrong to assume that infinity = infinity. The set of every possible combination of numerical characters is a level of infinity that is higher than the level of infinity that the infinite length of characters constituting pi.

The notion is flawed, but only because we don’t know that pi is normal. It has nothing to do with different sizes of infinity. The number of finite strings of digits is, in fact, equal to the number of digits in the representation of pi. The number of infinite strings of digits is a larger infinity, but nobody’s trying to find infinite strings of digits.

---

<div class="post-metadata">

**Author:** ![Learjeff](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@Learjeff](https://boards.straightdope.com/u/Learjeff)\
**Post date:** [May 28, 2014, 3:53pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/57 "2014-05-28T15:53:08Z")

</div>

> [@GargoyleWB](#):
>
> Here are the results of the obligatory “5318008”

Hell, I had to google that to find out it means (.)(.)

> [@Senegoid](#):
>
> If we made a ZIP file of pi, how compressed would that be? Would it still be infinitely long? 🙂

The underlying algorithm is called Lempel-Zev, in case you’d like to google that for more details. This algorithm takes advantage of any periodicity it can find to reduce the encoding. It also has a bit of overhead. Random noise doesn’t have enough periodicity to make it worthwhile. (That’s why English text and executable programs compress down a lot, but audio files, which have periodicity of a kind that LZ isn’t looking for, don’t compress much.)

For any given fixed portion of pi, the zip encoding is likely to be as big or bigger, if I understand it correctly. Only a little bigger, and sometimes smaller, because a random sequence will show some periodicity.

> [@AHunter3](#):
>
> The notion that _if_ pi is infinite it _therefore_ contains every combination possible–that somewhere in its infinite length there will be the complete words of Shakespeare and so on-- is flawed.

As **Chronos** says, the only flaw is that we have to assume it’s normal. That is, we have to assume the digits are random.

Given that assumption, it’s pretty easy to show it’s true. For any given fixed-length string, we can exactly calculate the probability of that string appearing in a random sequence of the same length. Since the probability is a fixed nonzero value, the probability of it occurring somewhere in an infinitely long sequence is exactly 1. See [the strong law of large numbers](http://en.wikipedia.org/wiki/Law_of_large_numbers). (I _recall_ it’s the strong law we’re using here, but it might be the weak law. My math-foo is too weak to differentiate the two in a quick look.)

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [May 28, 2014, 4:11pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/58 "2014-05-28T16:11:19Z")

</div>

> [@AHunter3](#):
>
> The notion that _if_ pi is infinite it _therefore_ contains every combination possible–that somewhere in its infinite length there will be the complete words of Shakespeare and so on-- is flawed.
> 
> There is more than one variety of infinity …

Infinity? No. The number of characters in all the books ever written is finite. The number of distinct ways to fill that huge sequence of characters with arbitrary symbols from all human languages is much much larger … but still finite. If we assume each galaxy in the observable universe has a billion civilizations, each with a library a billion times the size of Earth’s the number will still be finite.

The “flaw” is that, although a normal number will eventually, after only finitely many digits, reach the exact text of _Hamlet_ as well as _The Decline and Fall of the U.S.A._ (written 2143 by Benjamin Rush XII), you’ll first have to wade through trillions of Hamlet versions in which Hamlet and Ophelia elope in Act I, as well as trillions of faulty versions of Rush’s _Rise and Fall_ in which 9-11 _was_ a CIA plot and Sarah Palin becomes President in 2010.

---

<div class="post-metadata">

**Author:** ![Thudlow\_Boink](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/thudlow_boink/32/320_2.png) [@Thudlow\_Boink](https://boards.straightdope.com/u/Thudlow_Boink)\
**Post date:** [May 28, 2014, 4:15pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/59 "2014-05-28T16:15:03Z")

</div>

“It was the best of times, it was the blurst of times”?! You stupid monkey!

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [May 28, 2014, 4:37pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/60 "2014-05-28T16:37:09Z")

</div>

For what it’s worth, it’s possible that π is not normal but still contains every finite string of digits in its decimal expansion (i.e., that it is “disjunctive”). Not that anyone has any particular reason to suspect this, but it could happen…

[Previous page](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378.md?page=2)

[Next page](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378.md?page=4)
