# Where, if ever, does the decimal representation of $\pi$ repeat its initial segment?

I was wondering at which decimal place $\pi$ first repeats itself exactly once.

So if $\pi$ went $3.143141592...$, it would be the thousandth place, where the second $3$ is.

To clarify, this notion of repetition means a pattern like abcdabcdefgh...

• It seems extremely unlikely this happens. Oct 28, 2015 at 22:30
• If it repeated itself, it would be rational.
– Marc
Oct 28, 2015 at 22:34
• No, it would only be rational if it kept on repeating a certain sequence of digits. @Temme is only asking for the digit $n$ when it would repeat everything from the first digit to the $n-1$st digit starting from the $n$th digit, once.
– eyqs
Oct 28, 2015 at 22:40
• Using this pi-search page, you'll find that the first occurrence of $3141592$ is at position 25198140, and the first occurrence of $31415926$ is at position 50366472. Now that's just a repetition of $8$ numbers; imagine a repetition of 5 million numbers...
– eyqs
Oct 28, 2015 at 22:44
• @MarcPaul: Indeed, a number can even infinitely often repeat itself without being rational. Consider $0.10100101000101001010000101001010001010010100000\ldots$. It repeats itself after the second digit ($0.10\color{red}{10}\ldots$), after the fifth digit ($0.10100\color{red}{10100}\ldots$), after the 11th digit ($10100101000\color{red}{10100101000}\ldots$), … Oct 29, 2015 at 0:01

If you took a random $x \in [0,1]$, the probability that its first $n$ decimal digits are equal to its next $n$ decimal digits is $10^{-n}$. The probability that this occurs for some $n \ge N$ would be less than $\sum_{n=N}^{\infty} 10^{-n} = 10^{1-N}/9$. In particular, if it doesn't happen in the first million digits, it's extremely unlikely to ever happen. Now $\pi$ is not random, so this is only a heuristic when applied to its digits, but ...

This is unknown, but conjectured to be false; see e.g. Brian Tung's answer to PI as an infinite set of integers.

An interesting point here is the different kinds of "patternless-ness" numbers can exhibit.

On the one hand, there is randomness: where the idea is that the digits of a number are distributed stochastically. Random numbers "probably" don't have such moments of repetition, and in particular no random real will have infinitely many such moments of repetition. Randomness is connected with measure: measure-one many reals are random.

On the other hand, there is genericity: where the idea is that 'every behavior that can happen, does.' Having specified finitely many digits $a_1. . . a_n$ of a number, it is possible for the next digits to be $a_1. . . a_n$ again; so generic numbers do have such moments of repetition (in fact, they have infinitely many). Genericity is connected with category: comeager-many reals are generic.

It seems to be a deep fact of mathematics that naturally-occurring real numbers which are not rational tend to be random as opposed to generic. In particular, $\pi$ is conjectured to be absolutely normal, and absolute normality is on the randomness side of the divide. These notions of patternlessness, as well as others, are studied in the set theory of the reals as notions of forcing.

• Actually, in set theory, the term "genericity" is used to refer to all such patternless-ness notions, which can get confusing. :P I once got into an argument with a computability-theorist friend over whether randomness was a type of genericity - very Abbott-and-Costello . . . Oct 28, 2015 at 23:17
• OP seems to be asking for an $m$ such that $a_1\dots a_m=a_{m+1}\dots a_{2m}$, where $a_i$ is the $i$th digit. The fact that the sequence of digits $a_1\dots a_n$ repeat infinitely often for each $n$ doesn't guarantee that, does it? Oct 28, 2015 at 23:29
• @AkivaWeinberger I'm aware - that's why the immediate next digits have to be $a_1 . . . a_n$ again. This will happen infinitely often with generic reals, but will (probably) not happen with random reals. Oct 28, 2015 at 23:33
• Oh, I see. I misread. Sorry. Oct 28, 2015 at 23:36