# Q: Since pi is infinite, do its digits contain all finite sequences of numbers?

Mathematician: As it turns out, mathematicians do not yet know whether the digits of pi contains every single finite sequence of numbers. That being said, many mathematicians suspect that this is the case, which would imply not only that the digits of pi contain any number that you can think of, but also that they contains a binary representation of britney spears’ DNA, as well as a jpeg encoded image of you making out with a polar bear. Unfortunately, to this day it has not even been proven whether every single digit from 0 to 9 occurs an unlimited number of times in pi’s decimal representation (so, after some point, pi might only contain the digits 0 and 1, for example). On the other hand, since pi is an irrational number, we do know that its digits never terminate, and it does not contain an infinitely repeating sequence (like 12341234123412341234…).

One thing to note is that when mathematicians study the first trillion or so digits of pi on a computer, they find that the digits appear to be statistically random in the sense that the probability of each digit occurring appears to be independent of what digits came just before it. Furthermore, each digit (0 through 9) appears to occur essentially one tenth of the time, as would be expected if the digits had been generated uniformly at random.

While tests performed on samples can never unequivocally prove that a sequence is random (in fact, we know the digits of pi are not random, since we know formulas to generate them) the apparent randomness in pi is consistent with the idea that it contains all finite sequences (or, at least, all fairly short ones). In particular, if we generate a number from an infinite stream of digits selected uniformly at random, then there is a probability of 100% that such a number contains each and every finite sequences of digits, and pi has the appearance of being statistically random.

The following rather remarkable website allows you to search the digits of pi for specific integer sequences:

http://www.angio.net/pi/piquery

As it turns out, my social security number occurs near digit 100 million.

Physicist: One of my favorites.  Slow to converge, but fast to remember.  $\pi = 4 \sum_{n=0}^\infty \frac{(-1)^n}{2n+1} = 4 \left( 1 - \frac{1}{3} + \frac{1}{5} - \frac{1}{7} +\frac{1}{9} \cdots \right)$

This entry was posted in -- By the Mathematician, Math. Bookmark the permalink.

### 46 Responses to Q: Since pi is infinite, do its digits contain all finite sequences of numbers?

1. Thomas Thompson says:

The awesome part…assuming the digits of pi are statistically random, then not only are all finite sequences of numbers in there at some point or another, each sequence actually appears in pi an infinite number of times.

2. Nebosite says:

If it is true that Pi has all possible finite sequences, and the universe is finite, then then entire universe is somewhere described in the digits of Pi. Talk about your compression algorithms. “You can find a complete description of the universe, zip-encoded, starting at digit 10^120239234884840302929393482022039948393492039483940293849348203949384….”

3. gp says:

my work has touched the subject of pi many times, but i have not yet thought of this wonderful conjecture. i shall dedicate some work to prove it

-grigori p.

4. Camberwick Green says:

@Nebosite

Actually, if true, it would mean that pi contained a description of all possible universes at all possible points in history…

5. Weejon says:

And presumably every other transcendental number with the same property of randomness will have the same result.

This means that e (if e has this property) contains an arbitary sequence of digits of pi as well as pi containing an arbitrary sequence of digits of e (including the arbitrary sequence of digits of pi). Recursion here we come.

6. Tip says:

If all finite sequences appear, then that would include all the primes, right?

7. The Physicist says:

Yup!

8. Chris says:

Nebosite…

9. Vish says:

I really hope it’s Grigori Perelman who posted a comment on March 30, 2012 at 1:43 pm

10. August says:

It can not contain all sequence of numbers since it would be required to contain a sequence of infinite “1″s and hence not be irrational

11. TJ says:

Chronological DNA sequences for every human that ever lived.

12. Solly says:

So all the 1′s & 0′s on any CD, DVD, or blu-ray are conceivably already contained someplace within Pi and thus no film, computer program, album, book etc can be copyrighted as mathematics contains innate prior art…

sweet

13. Pingback: Pi is Cool | Mathspider

14. Ray says:

@August, FINITE sequences, not INFINITE sequences. Read the first sentence of the answer…

15. Dennis M. Dunn says:

I just had the craziest idea. What if the number Pi was used as the medium for a digital information library or database! All you’d need is the “Pi Index” to reference the location (and length) of the desired information. It would then be read as a image, sound, text, PDF, etc. whichever is applicable. The index might end up being quite long, but we already use pretty long URL’s, serial numbers, DOI’s, etc. to access information. Can you imagine the possibilities?

16. pljvp says:

Please feel free to check this oldie: an imagegenerator experiment

Part 1/3 , 2/3 & 3/3

17. Luke says:

This title doesn’t make sense. Pi isn’t infinite. I think the word you are looking for is, Transcendental. Look it up first: http://en.wikipedia.org/wiki/Pi. Fun article to read though

18. Blogron says:

Sometime I think that they way we define finite and infinite is so very wrong. We are defining the finite from our perspective as we do not know where the infinity ends.

Yes, Pi might have the sequence of same number coming again , but the number might also be so big that we may never catch the whole thing together. I believe even somewhere the infinity also ends in a circular way. Anyway, that is off-topic. But it is sure that pi will be still a mystery to end until we change the definition itself.

19. John says:

@Luke, infinite, as in has a never ending (and never repeating) decimal representation. It’s a property of all irrational numbers including pi. It’s even in the article you linked. Several times, actually. “its decimal representation never ends” “Since π is irrational, it has an infinite number of digits in its decimal representation”

20. Ted says:

The Physicist’s convergence is also a favorite of mine although, for symmetry (hence, easier remembering), I write the first value within the parentheses as 1/1, so:

4(1/1 – 1/3 + 1/5 – 1/7 + 1/9…)

21. robero says:

If it was the case, it simply means that Pi contains the numbers, 1, 2, 3… 10, 11, 13.. 1001, 1002… inf. Nothing that the number 0.1234567891011121314… etc does not contain. This contains an infinite sequence of 1, and 2 and all combinations. Every existent number. Which means It contains itself. Crazy things about infinity…

22. Kaptan Kaos says:

Im seeing spirals and we’re moving with them as they go through us putting our minds in a forward motion. Expanding in one direction and increasing in the other. π+ π- π+ π-, ……. Expansion, contraction, attraction, repel, order and chaos. It all ends with unity. Just as it began, keeps existing and will go on until time stops and matter as we know it disappears

23. Lanchon says:

@Nebosite: thats hardly compression, as the starting address (digit number) within pi would probably be much larger than the sequence you are trying to compress.

24. Theory says:

Well, it’s like giving a typewriter to a group of monkeys. If they don’t have a time limit they can write Shakespear’s plays without any mistakes.

25. doug bennion says:

Actually since the decimal expansion of pi is infinite, there must a point P in pi, such that it then repeats for (P-1) digits. That is pi = 3.14159 … 314159 …

Call that sequence S1, so pi = S1S1 …

It follows there must also be a sequence S2, such that pi = S2S2S2 ..

It then follows that ultimately pi = a repeating decimal, so is rational.

26. The Physicist says:

That’s is a proof that all numbers are rational, which doesn’t hold up.

27. MelosTE says:

Is there an irrational number who’s digits do NOT contain any finite sequence of numbers?

28. Shepherd Moon says:

@Tip, The Physicist:

I find it astonishing that any arbitrarily large prime number appears in pi if pi is normal. – if I understand the layman’s description of a normal number.

How likely is it that someone will prove whether pi is normal?

29. The Physicist says:

@MelosTE
Heck yes!
For example, 1.01001000100001000001…

30. Shepherd Moon says:

Also, I have another question.

If pi is normal, is it in any way meaningful to state that the number sequence of pi “in reverse” also appears in pi, e.g. …951413… but does that even make sense since pi never “ends” so there is no way to know what the “last” digit would be to start going backwards?

This whole thread makes my head hurt but is extremely fascinating.

31. MelosTE says:

@ The Physicist

Ouch! Silly me, you’re right, of course

But another question: Is the number of sequences like the one you constructed countable? If so, they form a set of measure zero, and “almost every” irrational number will have digits that contain any finite sequence of numbers. Anyone who knows?

32. The Physicist says:

@Shepherd Moon
Like you say, and for exactly the reason you say: it doesn’t make sense.

33. Marius says:

@Lanchon this COULD be a compression, if address would be encoded in a right way. For example, 2^(2^(2^(2^(2^2)))) is quite a big number. But generally, I think this would really work only with big data, as the position itself would really take much space

34. JoseLuis says:

Wow, fascinating!
Is this topic being very actively studied?
Would you have links to papers on the topic?

35. Trevor Alderson says:

Pi does not contain an encoded version of the universe or of any universe. The universe is not mappable onto any mathematical system. No system sufficiently complex can be both complete and consistent.

36. David says:

This is not necessarily true. For example, pi could at some point become 01001000100001000001 etc. and never reach a combination such as 69152084975101854209741097457801725379614985787926598704653982698365875784807401235912304576120349857348692756478 or something else. Though 01001… could go on infinitely, it is not really a pattern because one zero is added between the ones every time.

37. Macimo says:

Finite or not!?
Dag Nubb it!!!! Exclamations ad infinitum!

38. Sanjv paramswrn says:

But how do you know pi is irrational? It may end somewhere after the range of digits discovered by mathematicians.

39. The Physicist says:

The fact that pi is irrational isn’t something that has been discovered, it’s something that’s been proven. Several times in fact!

40. BenG says:

Finding any finite sequence of numbers applies to any irrational number, not just PI.
Square root of 2, for example

41. Xerenarcy says:

@doug bennion
you’ve raised an (un)interesting point…

if Pi digits do contain every sequence of digits 0-9 somewhere, it must also contain the digits of Pi. the uninteresting answer though is, it starts at position 0.

however, if you’re talking about the sequence 314159… within the decimal digits, that would be interesting because it would imply it must loop at some point. since to the best of our knowledge Pi does not repeat itself, it means that Pi cannot contain the sequence 314159… within its own digits. ergo, it does not contain every sequence possible

42. Marius says:

@Xerenarcy It’s said, that “contains every single finite sequence”, the one you’re talking about is not finite.