# Why do people say irrational numbers must contain any sequence of numbers?

**URL:** <https://boards.straightdope.com/t/why-do-people-say-irrational-numbers-must-contain-any-sequence-of-numbers/607064>\
**Category:** Factual Questions\
**Created:** [December 22, 2011, 10:18am UTC](https://boards.straightdope.com/t/why-do-people-say-irrational-numbers-must-contain-any-sequence-of-numbers/607064 "2011-12-22T10:18:30Z")\
**Posts on this page:** 16\
**Page:** 3

<div class="post-metadata">

**Author:** ![Steophan](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/steophan/32/9595_2.png) [@Steophan](https://boards.straightdope.com/u/Steophan)\
**Post date:** [July 7, 2013, 1:23pm UTC](https://boards.straightdope.com/t/why-do-people-say-irrational-numbers-must-contain-any-sequence-of-numbers/607064/41 "2013-07-07T13:23:03Z")

</div>

> [@Cheshire\_Human](#):
>
> 314159 shows up 21 times in the first 33 million digits. My phone number shows up, too.

Watch out for all those spam text messages now.

---

<div class="post-metadata">

**Author:** ![Bremidon](https://avatars.discourse-cdn.com/v4/letter/b/ac91a4/32.png) [@Bremidon](https://boards.straightdope.com/u/Bremidon)\
**Post date:** [July 7, 2013, 4:14pm UTC](https://boards.straightdope.com/t/why-do-people-say-irrational-numbers-must-contain-any-sequence-of-numbers/607064/42 "2013-07-07T16:14:59Z")

</div>

How would one even start to try to prove that pi never repeats itself? By repeat, I mean in the form of 3.XX where “X” can be any sequence of integers, obviously starting with 1415…

I do not mean repetition like 0.31313131313131313131…

Or maybe a slightly more meta-question: Can it be proven that such a proof is impossible?

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [July 7, 2013, 4:38pm UTC](https://boards.straightdope.com/t/why-do-people-say-irrational-numbers-must-contain-any-sequence-of-numbers/607064/43 "2013-07-07T16:38:19Z")

</div>

All you have to do is show that [pi is irrational](http://en.wikipedia.org/wiki/Proof_that_%CF%80_is_irrational).

---

<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:** [July 7, 2013, 6:35pm UTC](https://boards.straightdope.com/t/why-do-people-say-irrational-numbers-must-contain-any-sequence-of-numbers/607064/44 "2013-07-07T18:35:37Z")

</div>

It seems to me, from what **Bremidon** wrote, that they’re not asking about showing that pi is irrational; they’re just asking about showing that the decimal expansion of pi does not start off 3.XX [followed by further irrelevant digits] for any finite (nontrivial) string of digits X.

That is, showing that there is no positive integer N and natural X \<= 10^N such that pi - 3 - X/10^N - X/10^(2N) \< 1/10^(2N), if I’ve done my fiddling correctly…

I have no idea if anyone knows how to prove such a thing. But it may well be possible; there’s no obvious reason it shouldn’t be.

---

<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:** [July 7, 2013, 9:08pm UTC](https://boards.straightdope.com/t/why-do-people-say-irrational-numbers-must-contain-any-sequence-of-numbers/607064/45 "2013-07-07T21:08:30Z")

</div>

One could doubtless find some base in which the first two digits of pi after the radix point are the same. In such a base, pi would indeed have the form 3.XXetc where X was a sequence of digits.

While we’re at it, everyone’s second-favorite irrational (and transcendental) number, e, starts off 2.718281828…, with a repeated “1828”. And in fact, e actually has a tendency towards early repeats of this sort, in arbitrary base. The pattern always disappears once you get a ways in, though.

---

<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:** [July 7, 2013, 9:16pm UTC](https://boards.straightdope.com/t/why-do-people-say-irrational-numbers-must-contain-any-sequence-of-numbers/607064/46 "2013-07-07T21:16:02Z")

</div>

Oh? Why is there such a tendency? (And what are other examples? I’m having trouble finding them)

---

<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:** [July 7, 2013, 10:37pm UTC](https://boards.straightdope.com/t/why-do-people-say-irrational-numbers-must-contain-any-sequence-of-numbers/607064/47 "2013-07-07T22:37:03Z")

</div>

OK, now I have a bit of egg on my face, because it appears that, if it does have that tendency, it’s not very strong. Let me at least tell a story about how I came to that conclusion.

Many years ago, I noticed the repeat in base 10, and wondered if it was a pure coincidence. So I reasoned, well, e = 1/0! + 1/1! + 1/2! + 1/3! + … Since factorial numbers have a lot of factors, and in particular have a lot of factors in common with other factorial numbers, this means that it’s easy to find common denominators for the partial sums of that series. This would, I reasoned, naturally lead to e resembling a rational number, which would explain why it might have repeats in the first few digits. I thus became satisfied that the pattern wasn’t a coincidence, and that there thus no reason something similar shouldn’t also occur in other bases. At the time, I had no easy way available to me to calculate e in other bases, so I left it go at that.

Now, though, I [do have such tools available](http://www.wolframalpha.com/input/?i=e+in+base+6). And playing around with it a bit, I haven’t found any other base with such a pattern. So, as so often is the case, a beautiful theory is ruined by cold experiment.

---

<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:** [July 7, 2013, 11:23pm UTC](https://boards.straightdope.com/t/why-do-people-say-irrational-numbers-must-contain-any-sequence-of-numbers/607064/48 "2013-07-07T23:23:26Z")

</div>

Oh. That’s an interesting idea. Let’s see what we can do with it.

Take e[sub]n[/sub] to be the sum of reciprocal factorials up through 1/n!. We know that e[sub]n[/sub] is an integer over n!, and that e - e[sub]n[/sub] \< e/(n + 1)!. That’s not nothing; it tells us how to easily get rational approximates that quite quickly approach e.

But unfortunately, the denominators of the rational approximates grow at almost the same speed as the reciprocal of the error, which scuttles the idea of using this to guarantee patterns in digits [in general, 1/x can take up to x - 1 digits to start repeating, which means we’ll need accuracy on the order of 10[sup]-n![/sup] for this repetition to stay visible after the error term, but our error term is only on the order e/(n + 1)!].

We might be able to get more clever about bounding the denominator and digits-till-repetition of e[sub]n[/sub] and the magnitude of e - e[sub]n[/sub], but not clever enough to make the whole thing tick, I suppose, given that experiment shows it doesn’t actually work out. Ah well, happens to the best of us.

---

<div class="post-metadata">

**Author:** ![Bremidon](https://avatars.discourse-cdn.com/v4/letter/b/ac91a4/32.png) [@Bremidon](https://boards.straightdope.com/u/Bremidon)\
**Post date:** [July 9, 2013, 7:53am UTC](https://boards.straightdope.com/t/why-do-people-say-irrational-numbers-must-contain-any-sequence-of-numbers/607064/49 "2013-07-09T07:53:23Z")

</div>

> [@Indistinguishable](#):
>
> It seems to me, from what **Bremidon** wrote, that they’re not asking about showing that pi is irrational; they’re just asking about showing that the decimal expansion of pi does not start off 3.XX [followed by further irrelevant digits] for any finite (nontrivial) string of digits X.
> 
> That is, showing that there is no positive integer N and natural X \<= 10^N such that pi - 3 - X/10^N - X/10^(2N) \< 1/10^(2N), if I’ve done my fiddling correctly…
> 
> I have no idea if anyone knows how to prove such a thing. But it may well be possible; there’s no obvious reason it shouldn’t be.

Thank you Indistinguishable. That’s exactly what I’m asking. Proving irrationality would only prove that it does not repeat an infinite number of times.

I suspect that such a proof is not possible from non-rigorous intuition: to find a particular digit in an irrational number, you have to calculate the number out to said digit. Any proof that a number repeats itself (once) would imply that we know something about digits we have not yet calculated. While I can see the possibility of this being true, it does not seem likely.

---

<div class="post-metadata">

**Author:** ![Bremidon](https://avatars.discourse-cdn.com/v4/letter/b/ac91a4/32.png) [@Bremidon](https://boards.straightdope.com/u/Bremidon)\
**Post date:** [July 9, 2013, 8:14am UTC](https://boards.straightdope.com/t/why-do-people-say-irrational-numbers-must-contain-any-sequence-of-numbers/607064/50 "2013-07-09T08:14:18Z")

</div>

Huh. It just occurred to me that if we were able to prove 3.XX, it might be easy to expand that to 3.XXX, and 3.XXXX.

In fact, we might be able to expand it, so that we could say that the number repeats itself indefinitely, but not infinitly.

I suppose we could try to construct such a number:

0.1  
0.1 **22** 1  
0.1 **22** 1 **222** 1 **22** 1 **222** 1 **22** 1  
0.1 **22** 1 **222** 1 **22** 1 **222** 1 **22** 1 **2222** 1 **22** 1 **222** 1 **22** 1 **222** 1 **22** 1 **2222** 1 **22** 1 **222** 1 **22** 1 **222** 1 **22** 1 **2222** 1 **22** 1 **222** 1 **22** 1 **222** 1 **22** 1  
…

I think it should be clear how I am constructing the number. I use the 2’s to make sure that we never get an infintely repeating number; the number of 2’s also indicates the number of repetitions of 1’s and smaller groups of 2’s. This number is irrational with an indefinite number of repeats but not an infinite number of repeats.

So I guess I just partially torpedoed my own intuition. It is at least possible to construct a number with these attributes. Now, is it possible to prove a number has these attributes without having deliberately constructed it to be so?

---

<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:** [July 9, 2013, 4:39pm UTC](https://boards.straightdope.com/t/why-do-people-say-irrational-numbers-must-contain-any-sequence-of-numbers/607064/51 "2013-07-09T16:39:53Z")

</div>

_scratch this post_

---

<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:** [July 9, 2013, 5:24pm UTC](https://boards.straightdope.com/t/why-do-people-say-irrational-numbers-must-contain-any-sequence-of-numbers/607064/52 "2013-07-09T17:24:50Z")

</div>

> [@Bremidon](#):
>
> I suspect that such a proof is not possible from non-rigorous intuition: to find a particular digit in an irrational number, you have to calculate the number out to said digit. Any proof that a number repeats itself (once) would imply that we know something about digits we have not yet calculated. While I can see the possibility of this being true, it does not seem likely.

Consider the sequence whose kth digit is 1 if k is prime and 0 otherwise.

I know that this sequence does not start off XX, for X of any finite positive length. For we can easily check there is not a length 1 repeat [the 1st and 2nd digits of the sequence are 0 and 1, respectively], and for N \> 1, taking p to be a prime factor of N, we know that the pth digit of the sequence is 1 while the (p + N)th digit of the sequence is 0, and thus there is not a length N repeat. Q.E.D.

For all that, no one has ever calculated this sequence out beyond some particular point. So, you see, it’s possible in at least some cases to prove this sort of thing about a digit-sequence even though it entails facts about digits we have not yet calculated.

---

<div class="post-metadata">

**Author:** ![TATG](https://avatars.discourse-cdn.com/v4/letter/t/50afbb/32.png) [@TATG](https://boards.straightdope.com/u/TATG)\
**Post date:** [July 9, 2013, 6:02pm UTC](https://boards.straightdope.com/t/why-do-people-say-irrational-numbers-must-contain-any-sequence-of-numbers/607064/53 "2013-07-09T18:02:44Z")

</div>

> [@Bremidon](#):
>
> I suspect that such a proof is not possible from non-rigorous intuition: to find a particular digit in an irrational number, you have to calculate the number out to said digit. Any proof that a number repeats itself (once) would imply that we know something about digits we have not yet calculated. While I can see the possibility of this being true, it does not seem likely.

> [@Indistinguishable](#):
>
> So, you see, it’s possible in at least some cases to prove this sort of thing about a digit-sequence even though it entails facts about digits we have not yet calculated.

And, for base 16, we have such a formula for pi, see [Bailey–Borwein–Plouffe formula](http://en.wikipedia.org/wiki/Bailey%E2%80%93Borwein%E2%80%93Plouffe_formula)

---

<div class="post-metadata">

**Author:** ![TATG](https://avatars.discourse-cdn.com/v4/letter/t/50afbb/32.png) [@TATG](https://boards.straightdope.com/u/TATG)\
**Post date:** [July 9, 2013, 6:10pm UTC](https://boards.straightdope.com/t/why-do-people-say-irrational-numbers-must-contain-any-sequence-of-numbers/607064/54 "2013-07-09T18:10:33Z")

</div>

Oh I misread that, missing the entailing stuff about numbers not yet calculated. In any case, to know the nth digit of pi, in base 16, we don’t need to calculate all the preceding numbers, which is cool.

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [July 9, 2013, 9:05pm UTC](https://boards.straightdope.com/t/why-do-people-say-irrational-numbers-must-contain-any-sequence-of-numbers/607064/55 "2013-07-09T21:05:54Z")

</div>

The post about repeating digits reminds me of a fairly well-known but still interesting puzzle:

Construct an infinitely long ternary representation in which no adjacent groups are identical.

As a clarifying example, if you start .01202101202… you’re stymied:

If you add 0 then 20 _20_ is a forbidden duplication.  
If you add 1 then 012021 _012021_ is a forbidden duplication.  
If you add 2 then 2 _2_ is a forbidden duplication.

(Most solutions will have 33% each of 0,1,2. If the puzzle is too easy, look for a solution most skewed from the 33%-33%-33% distribution. :dubious: )

---

<div class="post-metadata">

**Author:** ![Bremidon](https://avatars.discourse-cdn.com/v4/letter/b/ac91a4/32.png) [@Bremidon](https://boards.straightdope.com/u/Bremidon)\
**Post date:** [July 10, 2013, 8:24am UTC](https://boards.straightdope.com/t/why-do-people-say-irrational-numbers-must-contain-any-sequence-of-numbers/607064/56 "2013-07-10T08:24:38Z")

</div>

> [@Indistinguishable](#):
>
> Consider the sequence whose kth digit is 1 if k is prime and 0 otherwise.
> 
> I know that this sequence does not start off XX, for X of any finite positive length. For we can easily check there is not a length 1 repeat [the 1st and 2nd digits of the sequence are 0 and 1, respectively], and for N \> 1, taking p to be a prime factor of N, we know that the pth digit of the sequence is 1 while the (p + N)th digit of the sequence is 0, and thus there is not a length N repeat. Q.E.D.
> 
> For all that, no one has ever calculated this sequence out beyond some particular point. So, you see, it’s possible in at least some cases to prove this sort of thing about a digit-sequence even though it entails facts about digits we have not yet calculated.

> [@TATG](#):
>
> And, for base 16, we have such a formula for pi, see [Bailey–Borwein–Plouffe formula](http://en.wikipedia.org/wiki/Bailey%E2%80%93Borwein%E2%80%93Plouffe_formula)

Wow, my intuition is taking a beating. Of course, I scored the first hit by construction, but it’s interesting to see that there are other examples.

Btw, interesting story about Plouffe and his (bad) impressions of his collaboration with Bailey and Borwein. ([story here with link to original post](http://xahlee.info/math/Simon_Plouffe_pi_formula.html)) They really come off looking like cads, if you accept Plouffe’s PoV. I was unable to find any verifications of his story or any responses from the other two, so I am somewhat skeptical.

[Previous page](https://boards.straightdope.com/t/why-do-people-say-irrational-numbers-must-contain-any-sequence-of-numbers/607064.md?page=2)
