How Many Zeros in a Row are Possible in Pi?

A random thought just passed through my brain. This happens a lot. In a base 10 representation of pi, is there a limit on how many zeros might appear in a row? If there is a limit, what is it? How would this be determined? Other than realizing it cannot be an infinite number of zeros, I have so far made no attempt at all to figure this out.

I have a long list of more mundane tasks to perform this morning such as the trash, laundry, mop the kitchen floor, dishes, brush my teeth, etc. so I thought I would let you all work on this for me and I’ll check back this afternoon.

There’s no limit on any representation of digits in π. While not true of all irrational numbers, it is true of Pi, as far as we know.

Pi is believed (but not proven) to be a normal number. If this is true, then all digits appear with equal probability, and any given string of any length “almost certainly” appears in it somewhere.

As I was washing dishes, I wondered if my original question is the exact same thing as asking “Is pi normal?” or is there some subtle difference.

Well, the questions are not equivalent. A number could contain sequences of zeros of any length and not be normal. A trivial example is zero (0.00000…). But the converse is true: if a number is normal, it will probably contain sequences of zeros of any finite length (with probability 1).

It’s conceivable that pi could have strings of zeros of arbitrary lengths, but still not be normal. If pi is normal, it will have strings of zero of arbitrary length.

The base ten expression 0.101001000100010000… has strings of zero of arbitrary length and is certainly not normal.

Just the kind of example I was thinking of

Here is a site that lets you search for any sequence in the first 200 million digits of pi.

Nine zeros in a row do not appear.

Eight zeros in a row appears twice.

I’m trying to get my head around the concept of “almost surely” as regards probability:

In any event, does this mean that if we encode the English alphabet into two-digit sequences (A = 01, B = 02, etc.), then somewhere within the digits of pi we should expect to see the entire text of Hamlet so encoded?

I have a related question. I know that π has been calculated to millions trillions of digits using more efficient algorithms and modern computers. So…what is the longest string of repeated digits that has been observed to date?

…and in an attempt to answer my own question, there is a sequence of 13 eights starting at position 2164164669332.

“Almost certainly” isn’t accurate, here. If pi is normal (which is suspected but not proven), then it is absolutely 100% true that it contains strings of zeroes of arbitrary length, because that’s part of the definition of a “normal number”.

Where the “almost certainly” comes in is that almost all real numbers are normal. That’s why people suspect (but have not yet proven) that pi is normal. Basically, all numbers are normal unless there’s some reason why they shouldn’t be. Rational numbers, for instance, aren’t normal because their expansions always contain repeating strings of digits. The base ten number 0.101001000100001000001… that @Exapno_Mapcase referred to isn’t normal, because its expansion doesn’t contain any 2s. Nobody knows of any reason why pi (or e or sqrt(2) ) shouldn’t be normal, so we’re guessing that they are, but maybe there is a reason that we just haven’t found.

Despite almost all real numbers being normal, it’s remarkably difficult to prove it for any given number. So far as I know, the only specific numbers that have actually been proven to be normal are numbers that are specifically constructed just for the purpose of being normal numbers.

That depends on how literally you take “we should expect to see.” Just because it’s there doesn’t mean you’re personally going to see it.

If pi is normal, or for that matter if we use any other normal number, then yes, there will be somewhere in the number where Hamlet is encoded. But even if we could find it, the number representing the place where we’d find it would probably, itself, be about as long as Hamlet. It’s not a data compression scheme.

For one thing, the odds are that before we got to the perfect reproduction of Hamlet in pi, we’d find countless versions of Hamlet where the first two scenes were given and then the rest was nonsense

And just to hammer the concept into the ground, countless examples of just one act, countless examples of every other line, countless examples of the words appearing in backward order, countless examples of the above being true in every language that ever existed or ever will exist, countless examples of this for every other play by Shakespeare, countless examples of this for every book ever written and will be written in the future, countless examples of every thread on the Dope, countless examples of the source code for every thread of the Dope, countless examples of the entire Internet in every language, and countless examples of every variant you can possibly think of. Infinity is not merely a very large number. Infinity is endless and every finite thing that can be coded will be found eventually, although probably long after the universe has dissipated.

Was the use of the word “countless” appropriate in the last two posts? While the number of scenes or acts of Hamlet encoded in pi might be extremely large or even infinite, they are still “countable”, correct? But I am sure someone will argue that “countless” does not mean the same thing as “uncountable.”

Countable has a specific meaning in math. As long as you can map the number of instances to the natural numbers then your set is countable.

Every few years, someone computes a few more hundred trillion digits of pi, so I’m not sure what the longest string of zeros is that is currently known; 13 zeros is quite old news already.

I was using countless in the ordinary conversational sense, not as the specific math term “countable.” I assume that @Andy_L did the same, although I’m sure he’ll come back and speak for himself.