# 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:** 2

<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, 7:46pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/21 "2014-05-27T19:46:35Z")

</div>

> [@Thudlow\_Boink](#):
>
> There is no theoretical longest possible string of the same consecutive digit. If pi is indeed normal (and maybe even if it’s not) its digits could contain consecutive sequences of _any_ particular finite length.

That’s certainly true of a true random number generator but is it true for pi? I’m probably wrong but it seems to be that by the nature of the way the pi is calculated that there could be sequences that couldn’t happen.

---

<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 27, 2014, 7:49pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/22 "2014-05-27T19:49:03Z")

</div>

> [@hajario](#):
>
> That’s certainly true of a true random number generator but is it true for pi? I’m probably wrong but it seems to be that by the nature of the way the pi is calculated that there could be sequences that couldn’t happen.

See post #6.

---

<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 27, 2014, 7:49pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/23 "2014-05-27T19:49:38Z")

</div>

> [@EdwardLost](#):
>
> Sounds like this could be the basis for a hobby: The Pi Searchers Club. You try out different coding schemes and, when you find something interesting, you share it online. Maybe “disco sucks” or a 16-pixel portrait of Abraham Lincoln.

It _is_ a hobby, and there _is_ a club of sorts. Finding messages in pi lies at the convergence of recreational mathematics and recreational linguistics, both of which subjects are supported by small but very enthusiastic (not to mention prolific) communities. Among the many books and journals devoted to such things, [_Word Ways: The Journal of Recreational Linguistics_](http://digitalcommons.butler.edu/wordways/) has probably published the most on words embedded in pi and other irrational numbers. Offhand I can think of the following articles, all of which are old enough that they should be free to read on the journal’s archive without a subscription:  
[ul]  
[li][Base 27: The Key to a New Gematria](http://digitalcommons.butler.edu/wordways/vol26/iss2/2/) by Lee Sallows (Vol. 26, No. 2)[/li][li][The Pi Code](http://digitalcommons.butler.edu/wordways/vol32/iss4/2) by Mike Keith (Vol. 32, No. 4)[/li][li][Cracking The Pi-Code](http://digitalcommons.butler.edu/wordways/vol32/iss4/3) by Dave Morice (Vol. 32, No. 4)[/li][li][Further Cracks in the Pi-Code](http://digitalcommons.butler.edu/wordways/vol33/iss1/11) by Mike Keith (Vol. 33, No. 1)[/li][li][Pi Words](http://digitalcommons.butler.edu/wordways/vol34/iss1/10) by Howard Bergerson and Mike Keith (Vol. 34, No. 1)[/li][li][Embedding Many Words in Pi](http://digitalcommons.butler.edu/wordways/vol39/iss2/19/) by A. Ross Eckler (Vol. 39, No. 2)[/li][/ul]  
I won’t repeat all their findings here, which probably run to a couple dozen pages, though I can promise you that they articles are all quite accessible, and probably quite interesting if you’re into linguistic and mathematical oddities.

[Mike Keith](http://www.cadaeic.net/), who wrote many of the above articles and who’s a coauthor of mine on some further work in this general area, also maintains a website devoted to recreational mathematics and linguistics. One of the pages on it is devoted specifically to messages in pi: [The Pi Code](http://www.cadaeic.net/picode.htm)

---

<div class="post-metadata">

**Author:** ![ZenBeam](https://avatars.discourse-cdn.com/v4/letter/z/3ab097/32.png) [@ZenBeam](https://boards.straightdope.com/u/ZenBeam)\
**Post date:** [May 27, 2014, 7:59pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/24 "2014-05-27T19:59:48Z")

</div>

> [@Half\_Man\_Half\_Wit](#):
>
> What, other than convention, singles out the .gif format, as opposed to other formats like .jpeg, .bmp and so on? Or something else entirely?
> 
> Ultimately, that picture is just a set of pixels lighting up on a screen. How you code for that is (within the limits that make a code reasonable) entirely arbitrary. A code exists such that the first few digits of π represent the image, a code exists such that it only occurs after the umptillionth one, and so on.

Don’t image formats tend to have a header? We could look at all the formats in use. If there’s a format that has a header of just a few bytes, followed by the data, we could just search for the header, and take whatever follows as the image data.

ETA:

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

Fortunately, I have Flash set to require me to click to play.

Gotta practice safe surfing, dontcha know…

---

<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 27, 2014, 8:24pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/25 "2014-05-27T20:24:25Z")

</div>

> [@Half\_Man\_Half\_Wit](#):
>
> What, other than convention, singles out the .gif format, as opposed to other formats like .jpeg, .bmp and so on? Or something else entirely?
> 
> Ultimately, that picture is just a set of pixels lighting up on a screen. How you code for that is (within the limits that make a code reasonable) entirely arbitrary. A code exists such that the first few digits of π represent the image, a code exists such that it only occurs after the umptillionth one, and so on.

Okay, understood.

Well then, when I open the gif image of the smiley in a simple text editor application, it gives me several lines of ASCII code. I’m most positive a search for that string would easily extend beyond billions, if not quadrillions of places of pi.

---

<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 27, 2014, 8:26pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/26 "2014-05-27T20:26:24Z")

</div>

Pi, if so normalized, should have a googleplex of consecutive zeros.

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [May 27, 2014, 8:31pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/27 "2014-05-27T20:31:41Z")

</div>

> [@Chronos](#):
>
> The string “Never tell me the odds.”, assuming ASCII encoding, would be 184 bits, meaning you’d need 2^184 bits of pi, or 2.5e55, to have a reasonable expectation of finding it.

ASCII is pretty inefficient, though. For starters, one might use a 5-bit code instead–sufficient for letters and basic punctuation. A very simple Huffman code would reduce the average to around 4 bits/character. A context-sensitive Arithmetic code can reach maybe 2.2 bits/character. That’s already reaching brute-force levels (~50 bits), but the theoretical limit of English text is more like 1 bit/character, which would make this passage easy to find.

---

<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 27, 2014, 8:41pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/28 "2014-05-27T20:41:51Z")

</div>

You could interpret the digits of pi so that 2–8 equal shades of gray, 1 and 9 equal white and black respectively and 0 would indicate starting a new row of pixels. That way this would give you a simple B&W smiley face:

“…11111101911910911119019999101111110”

---

<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 27, 2014, 9:31pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/29 "2014-05-27T21:31:30Z")

</div>

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.

And while we don’t know that pi is normal, we do have strong reason to suspect it, in that the vast majority of real numbers are normal, and there isn’t any reason to suspect that pi is _not_ normal.

---

<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 27, 2014, 9:35pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/30 "2014-05-27T21:35:16Z")

</div>

It’s odd to me that people are so interested in finding strings in π. Why not search for strings in the [Champernowne constant](http://en.wikipedia.org/wiki/Champernowne_constant) instead (where you’re guaranteed to find them, and about as quickly as you’d expect from a random string of digits)? Too easy?

---

<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 27, 2014, 9:42pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/31 "2014-05-27T21:42:35Z")

</div>

> [@Chronos](#):
>
> And while we don’t know that pi is normal, we do have strong reason to suspect it, in that the vast majority of real numbers are normal, and there isn’t any reason to suspect that pi is _not_ normal.

Well, “vast majority” according only to some particular distribution which has no particular connection to the distribution of human interest in arithmetic constants. In the same sense, the “vast majority” of real numbers are uncomputable, etc., contra the vast majority of arithmetic constants of longstanding mathematical interest.

There are measures on the real numbers such that the normal numbers have measure zero, so why should we not just as well consider ourselves to have strong reason to suspect pi is non-normal? Put another way, consider a bijection f between the normal and the non-normal numbers (both having, classically, the cardinality beth\_1). Can we not just as well apply this kind of argument to suspect f(pi) is normal? But that would amount to suspecting pi is non-normal!

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [May 27, 2014, 10:03pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/32 "2014-05-27T22:03:05Z")

</div>

> [@Chronos](#):
>
> 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.

Right. Which is why this problem is actually a bit boring when you think about it. Inefficient codings guarantee that nothing of any interest will be found (184 bits is simply unreasonable, not to mention the bits you need for a paragraph or book). Efficient codings have the problem you describe (hell, we can encode every book with an ISBN number as… the ISBN number). In between we have codings (like Huffman) which are moderately efficient and somewhat general, but are still optimized toward a single language, etc.

And as **Indistinguishable** says, the Champernowne constant also contains every possible string, with the added advantage that we know exactly where that string starts. That seems even more boring, for some reason… but why? It’s just as a good a number as pi.

---

<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 27, 2014, 10:09pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/33 "2014-05-27T22:09:11Z")

</div>

> [@](#):
>
> In the same sense, the “vast majority” of real numbers are uncomputable, etc., contra the vast majority of arithmetic constants of longstanding mathematical interest.

Well, yes, but we do have strong reason to suspect (warning: extreme understatement) that pi is computable.

> [@](#):
>
> There are measures on the real numbers such that the normal numbers have measure zero, so why should we not just as well consider ourselves to have strong reason to suspect pi is non-normal?

I was not aware of the existence of these measures.

In any event, there is one other line of evidence that suggests pi’s normality: All of the finite sets of digits we’ve collected appear statistically consistent with normality. Now, granted, that’s not proof and can’t really be extended into a proof, since we can only ever sample finite sets and not the full infinite one, but it’s still suggestive.

---

<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 27, 2014, 10:16pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/34 "2014-05-27T22:16:31Z")

</div>

Because pi is taught in grade school and is one of the most practical numbers taught so early, making it incredibly widely-known, familiar and easy to understand.

---

<div class="post-metadata">

**Author:** ![Shagnasty](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@Shagnasty](https://boards.straightdope.com/u/Shagnasty)\
**Post date:** [May 27, 2014, 10:33pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/35 "2014-05-27T22:33:00Z")

</div>

My date of birth occurs 4 times in the first 200 million digits of pi. That clearly means…something. Now I just have to figure out how to translate the rest of it to get the full story.

---

<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 27, 2014, 10:49pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/36 "2014-05-27T22:49:53Z")

</div>

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. “Wait, so instead of dealing with all that information, I could just say what digit it start on, and find it all already there?”. They don’t realize that specifying the digit it starts on would take just as much information as the string itself.

---

<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 27, 2014, 10:50pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/37 "2014-05-27T22:50:14Z")

</div>

> [@cmyk](#):
>
> Because pi is taught in grade school and is one of the most practical numbers taught so early, making it incredibly widely-known, familiar and easy to understand.

Sure. I mean, I get it. I understand why this is a phenomenon of human behavior.

Still, I think it’s worth noting that 012345678910111213141516… is an even easier to understand string of digits (and, in some sense, more familiar and earlier taught), and guaranteed to contain what you’re looking for. This is my gift to all the tired π-searchers, brows sweaty and arms aching from their silly labor. You can finally relax. Enjoy!

---

<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 27, 2014, 10:51pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/38 "2014-05-27T22:51:24Z")

</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. “Wait, so instead of dealing with all that information, I could just say what digit it start on, and find it all already there?”. They don’t realize that specifying the digit it starts on would take just as much information as the string itself.

Right, which is why I think pointing out a simple string of digits with manifestly the properties they’re hoping for from pi, and just as manifestly no use in compression, is useful to them.

---

<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 27, 2014, 10:56pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/39 "2014-05-27T22:56:48Z")

</div>

The Champernowne constant lacks mystery and intrigue. Association with a pure geometric figure we are drawn to and draw. There’s something compelling about pi… its _randomness._  
We’re pretty sure every finite string is in there somewhere… but is it really? If I needed or wanted to, for whatever reason, can I find it? Does it speak something about nature itself? And, y’know: Pie.

---

<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 27, 2014, 11:07pm UTC](https://boards.straightdope.com/t/what-texts-or-images-have-we-found-in-pi/689378/40 "2014-05-27T23:07:06Z")

</div>

> [@GargoyleWB](#):
>
> Here are the results of the obligatory “5318008” from [The Pi Search](http://pi.nersc.gov/) page…
> 
> Pi-Search Result:
> 
> search string = “5318008”  
> 28-bit binary equivalent = 0101001100011000000000001000
> 
> search string found at binary index = **2729541692**  
> binary pi : 1100100001010011000110000000000010000010000101111111110011111110  
> binary string: 0101001100011000000000001000  
> hex pi : 4d3f224e5763dfd833a3fc85318008217fcfe5503a4a1545  
> hex string: 5318008

When you’re searching pi for them, it’s my bet it’ll be the only place you’ll find them. 😉

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

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