# PI as an infinite set of integers

I just had an interesting conversation with my kid who asked an innocent question about the $\pi$:

If $\pi$ is infinite - does that mean that somewhere in it there's another $\pi$?

I looked around and found this question and a few other, similar ones but I'm afraid my math knowledge is a bit limited to draw a definitive conclusion to the above question.

Further conversation yielded a secondary question:

Is there a place within $\pi$ where the complete previous set of numbers (starting with the $3.14...$) repeats all the way to the beginning of that repetition set?

This question seems rather tricky to me as my assumption is that such a set should exist (because the set is infinite, so the probability of such set's existence should be non-$0$, right?) but the longer we "wait" for such a repetition to occur the longer that repeated set should be, which makes the "wait" longer... and I'm falling into a recursion here :)

In addition the fact that $\pi$ is irrational means there are no repeatable sequences of digits in it (if my understanding is correct) which kind of throws off the whole "such a sequence should exist since the series is infinite" logic.

An extension to the second question is:

Is it possible to calculate the probability of such a subset's existence (the one that repeats all the previously seen numbers in the exact same sequence) and if so - what would that probability be?

• What you said is true - If $\pi$ contains itself as a subsequence then the digits of $\pi$ repeat themselves, which implies that $\pi$ is rational. $\pi$ is irrational, so this doesn't happen. – Zur Luria Oct 1 '15 at 13:57
• @ZurLuria This only hold if it repeat itself an infinite amount of times in a row, but this is not what he ask in the question. – Ove Ahlman Oct 1 '15 at 14:00
• It is not known whether $\pi$ is normal or not. It may well have some magic property (for example, start going $\dotsc\,010010001\dotsc$ from the decimal place $10^{10^{10^{100}}}$), such that the answer to your question is definitely no (in general i.e. for big enough sequence), or (from the decimal place $10^{10^{10^{100}}}$, repeat since the beginning) definitely yes. Rationality implies the decimal expansion repeats forever. It is not forbidden for an irrational number to repeat some decimal sequence and then continue to go crazy. – dbanet Oct 1 '15 at 14:01
• @OveAhlman If it would contain a single repetition of itself, by recursion, it would repeat itself an infinite amount of times in a row. So what Zur Luria says is correct, if I understand the original question properly. – Morgan Rodgers Oct 1 '15 at 14:05
• Your "main question" has a definite negative answer: If (in string notation for the numeral, and ignoring the decimal point) $\pi = x\pi$ for some finite prefix $x$, then $\pi = x\pi= xx\pi=xxx\pi=\dots$, and every finite prefix of the numeral would be indistinguishable from a prefix of $x^\infty$ -- which contradicts the irrationality of $\pi$.The 2nd & 3rd questions are addressed by answers at the cited link. – r.e.s. Oct 2 '15 at 5:08

Cute kid. I hope you encourage him to ask these questions and to thing how one might answer them.

Preamble: I think one of the most common misconceptions of mathematics is variations of the expression "the interesting thing about pi is that in goes on forever and never repeats". This is not unique to pi and it is not in the least bit unusual. Irrational numbers are actually far more common than rationals. I don't think most people, not even most mathematicians, intuitively realize just what numbers with infinite decimal expansions mean.

Think about this: For any sequence of numbers you can imagine in any way or order, you can make an irrational number from that. And consider this: between the number .4446 and .4447 you have to "go through" an infinite set, every set, of possible combination of infinite and finite, but mostly infinite, sequences of numbers starting with 4 4 4 6..... 44461284749487493... is in there, 44463141592653.... is in there, 44467777777777.... is in there. 444612345678910111213141516171819202122232425262728293031323334353637.... is even in there. They are all in there. Are you beginning to see how many and common yet how strange and huge these are?

So, there's actually no reason we should be talking about pi. We could be talking about any irrational number and we can make up any possible irrational number we like.

1) Normalcy, patterns and repeating: "If a number repeats it's rational, otherwise it's irrational". Sort of. A rational number will either terminate (reach a 0 and have 0s forever) or reach a point where it will repeat a single pattern forever. Example: 1/7 = 0.14285714285714285714285714285714... which repeats 142857 over and over again. An irrational number can repeat a pattern a few times and then quit. It can even repeat a pattern forever if there are variations and breaks in the pattern. .123012300123000123000012300000123000000.... "repeats" but there are variations so it doesn't repeat the same thing exactly so it is irrational.

Now a "normal" irrational number, one we pick arbitrarily, "shouldn't" have any discernible pattern but have digits in a normal arbitrary distribution. (There are infinite numbers that don't but there are "more" that do.) pi is probably normal but we don't actually know.

2) Specific strings: All things being arbitrary, we expect any particular string n-digits long to pop up once every $10^n$ places we look. That's not very often but as an irrational has an infinite span we expect it to show up time and time again. But we don't expect it to show up in one specific place.

So we do expect the first thousand digits of pi to show up later in pi but we do not expect it to appear at *exactly the 1001 place. If we pick irrationals randomly we'd expect 1 out of 10 will start with the first number repeated twice. We'd expect 1 in 100 to start with the first two digits repeated twice. 1 in 1000 for the first three. And 1 in a googol to repeat the first 100 digits twice.

BUT we know such numbers do exist and as all pattern happen we can make one up. The does exist a number starting with 3.1415926 and continuing with the first 1000 digits of pi and then immediately repeating them. But that number is not pi. (It's within 1000 digits of pi so its close.*)

3) Finding pi in pi: Well, when we say any number will appear in pi we are usually implying any finite number will appear in pi. It's logistically, well, meaningless, to find an infinite sequence within a sequence because ... well, if the inserted sequence is infinite it has a start but no end, and if it has no end we can't put anything on "the other side", and therefore we aren't actually "inserting" it.

But, as we can make any sequence of numbers into an irrational number, we can make some sort of "fractal" decimal where patterns of 31415926 are inserted inside themselves in large and small and telescoping patterns. (But that sure as heck is not a normal irrational). Exactly how the pattern is defined is up to us but as the number has no end we can't expect it to be symmetrically nested or anything like that.

*[Notice I just implied there are 10000000000 googal different numbers all within a thousand decimal places of pi! That's pretty much my primary point. There are a lot of irrational numbers and they are very tightly packed and the are infinitely varied.]

Just some initial thoughts while I ponder further.

Let me clarify the question I think is being asked a bit. Does there exist an integer $n > 0$ such that the first $n$ digits of $\pi$ (including the $3$) are followed by the same $n$ digits? After that, the digits may continue along arbitrarily.

(I interpret the question this way, because assuming that the entirety of $\pi$ is repeated would indicate that $\pi$ was rational, which is known to be untrue.)

I'm pretty sure that the answer to this clarified question is unknown. If $\pi$ is indeed normal, as many people expect (but it is not known, either), then we might reason as follows:

After the first $n$ digits, what is the probability that the next $n$ digits duplicate those first digits? If $\pi$ is normal, this probability is $1/10^n$. If we denote by $N$ the largest number for which this is known not to be true, then the probability that it eventually happens would have a lower bound of $1/10^{N+1}+1/10^{N+2}+\cdots = 1/(9 \cdot 10^N)$.

It's only a lower bound, because the first $n$ digits may well have a suffix that duplicates some of the needed digits of $\pi$ for the repetition. I don't have a good feeling at the moment, given a random normal number, how deep such a suffix might go, and how that would affect the probability. It seems unlikely to me, however, that it would raise it anywhere near $1$.

ETA: Perhaps we can place an upper bound on it, in the following way. We will assume all kinds of independence that are not actually warranted, yet that might give some insight anyway.

Suppose that we know that the first $2n$ digits do not contain any satisfactory duplication. What is the probability that the last $n-1$ of these $2n$ digits duplicate the first $n-1$ digits of $\pi$? It is $1/10^{n-1}$ (assuming independence). What is the probability, given that the last $n-1$ of these $2n$ digits duplicate the first $n-1$ digits of $\pi$, that the next two digits complete a duplication? It is $1/100$. The product of these two is $1/10^{n+1}$.

What is the probability that the last $n-2$ of these $2n$ digits duplicate the first $n-2$ digits of $\pi$? It is $1/10^{n-2}$. What is the probability, given that the last $n-2$ of these $2n$ digits duplicate the first $n-1$ digits of $\pi$, that the next four digits complete a duplication? It is $1/10000$. The probability of these is $1/10^{n+2}$.

And so on. We should be able to upper bound the probability of a duplication before the $4n$th digit by $1/10^{n+1}+1/10^{n+2}+\cdots = 1/(9 \cdot 10^n)$. If the largest prefix of $\pi$ we know contains no such duplication has length $2N$, then our total probability should be no more than the sum

$$\frac{1}{9 \cdot 10^N}+\frac{1}{9 \cdot 10^{2N}}+\frac{1}{9 \cdot 10^{4N}} + \cdots < \frac{1}{9 \cdot (10^N-1)}$$

Obviously, I've taken a lot of liberties here. Any thoughts, anyone, on whether any of them matter?

• So the short answer is "nobody knows", right? (and yes, you interpreted my question correctly) – YePhIcK Oct 2 '15 at 0:18
• Yes. However, I think it's probably pretty unlikely. – Brian Tung Oct 2 '15 at 0:35

Short answer: If $\pi$ contained a $\pi$, then that $\pi$ would contain a $\pi$, and so on, turning the whole thing into a recurring decimal, and therefore rational. However $\pi$ considered as a sequence does contain a subsequence that would be $\pi$, and that contains another such subsequence, and so on. The problem is due to the rather strict requirement that the subsequence should be a nontrivial tail.

• Since it's not known whether $\pi$ is normal, how do you know you can find a non-trivial subsequence of the digits of $\pi$ that is also equal to the digits of $\pi$? Is there some theorem that says every digit appears infinitely often in the expansion of $\pi$? If you have an argument to support your claim, it would be helpful to add it. – user2566092 Oct 1 '15 at 14:26
• This is a proof by contradition: you first ASSUME that $\pi$ contains a copy of itself, and show that this leads to something known to be false, thereby showing that your assumption was false. – John Hughes Oct 1 '15 at 14:41
• I must admit, I assumed that there wouldn't be any digits that appeared only a finite number of times in the decimal expansion of $\pi$. – user80034 Oct 1 '15 at 15:50
• " how do you know you can find a non-trivial subsequence of the digits of π that is also equal to the digits of π?" That would mean an infinite sequence within an infinite sequence. That's logistically impossible. (Unless the sequence simply repeats a finite subsequence; i.e. is rational). – fleablood Oct 2 '15 at 2:50

Turning my comment into an answer: for finite repetitions of finite sequences since the beginning, it is not known as of 20151001 (I believe we have not (yet?) found one, otherwise that would be viral).

It is not known whether $\pi$ is normal or not. It may well have some magic property (for example, start going $\dotsc\,01001000100001\dotsc$ from the decimal place $10^{10^{10^{100}}}$), such that the answer to your question is definitely no (in general i.e. for big enough sequence), or (from the decimal place $10^{10^{10^{100}}}$, repeat since the beginning) definitely yes. Rationality implies the decimal expansion repeats forever. It is not forbidden for an irrational number to repeat (a finite number of times) some (finite) decimal sequence and then continue to go crazy.