This question is related with Does Pi contain all possible number combinations?. More specifically, I want to know if $\pi$ contains $1234567890$. I checked this link https://www.facebook.com/notes/astronomy-and-astrophysics/what-is-the-exact-value-of-pi-%CF%80/176922585687811 and did not see it there. I think that $\pi$ does not contain $1234567890$. It is true or not. If it is true, how to prove it?

  • 1,284
  • 1
  • 12
  • 30
  • 35,127
  • 2
  • 53
  • 73
  • 6
    There is no good reason whatsoever to think $\pi$ does not contain that sequence. – Gerry Myerson Jun 28 '13 at 12:29
  • 1
    @GerryMyerson : Is there any good reason to think that it does contain that sequence? – jimjim Jun 28 '13 at 12:35
  • @GerryMyerson, I am just curious. – xpaul Jun 28 '13 at 12:35
  • 4
    @Arjang, most real numbers contain it. – Gerry Myerson Jun 28 '13 at 12:36
  • 1
    @Arjang For all bases $b$, almost all (all but the elements of a Lebesgue null set) real numbers are normal in base $b$. Choose $b = 10^{10}$. – Daniel Fischer Jun 28 '13 at 12:37
  • 6
    You've checked 0% of the digits of $\pi$, and from that you want to draw a conclusion? Infinity is big... – Thomas Andrews Jun 28 '13 at 12:40
  • 6
    Did you read the answers to the question you linked? It is not known if $\pi$ is normal or disjunctive, so I'd say with near certainty that nobody here will be able to prove that $1234567890$ does *not* appear in the decimal expansion of $\pi$. I'm even more certain that nobody here will *want* to prove that it does, as this will involve searching through a ridiculous number of digits (*if* the string *does* appear). – Cameron Buie Jun 28 '13 at 12:41
  • Actually, it's stronger than that, @DanielFischer. Almost all real numbers are normal in all bases. – Thomas Andrews Jun 28 '13 at 12:42
  • @xpaul: Thomas put Gerry's point rather succinctly. – Cameron Buie Jun 28 '13 at 12:42
  • @ThomasAndrews Yes, since there are only countably many bases. But we're just interested in one here ;) – Daniel Fischer Jun 28 '13 at 12:42
  • 3
    Who knows. You can [search the first 200 million digits here](http://www.angio.net/pi/digits.html) and see that those do not contain that particular string. "12345678" does, though. The decimals of pi have been calculated to [ridiculous precision](http://www.numberworld.org/misc_runs/pi-10t/details.html), so if you want, you could load up one of those pieces of software and go looking. (From that page: "If the digits were stored in an uncompressed ascii text file, the combined size of the decimal and hexadecimal digits would be 16.6 TB.") – fuglede Jun 28 '13 at 12:47
  • @DanielFischer, I understand. But I want to know the reason. – xpaul Jun 28 '13 at 12:49
  • Of course, the first $200$ million digits likely won't be enough - the expected number of digits you'll need, if $\pi$ were a random string of digits, is $10^{10}$ digits, which is $10$ billion. – Thomas Andrews Jun 28 '13 at 12:53
  • 1
    Fortunately, Alexander Yee has computed the first (somewhat more than) $10^{13}$ digits, which gives anybody with enough patience a fighting chance of finding any particular 10-digit sequence. – Daniel Fischer Jun 28 '13 at 13:00
  • @DanielFischer So the suggestion is to download these digits (two per byte?) via a 100Mbps link and then report the result here in about 4 days (or 6 weeks if you only have a 10Mbps internet link). I won't volunteer :) – Hagen von Eitzen Jun 28 '13 at 15:18
  • @HagenvonEitzen Another option would be to ask [Mysticial](http://stackoverflow.com/users/922184/mysticial) for the code, and run it. With a fast computer and a slow internet connection, that would be faster. But anyway, a lot of patience would be required ;) – Daniel Fischer Jun 28 '13 at 15:22
  • The sequence "1234567890" first appears in $\pi$ starting at the 7,997,135,198th digit, based on $\pi$ calculated on my computer to 25 Billion digits by y-cruncher – Mark Omo Jun 03 '19 at 20:50

1 Answers1


The nature of most real numbers is that, in any base, you can find any sequence of digits infinitely many times. The definition of "most" is technical, but rigorous.

We don't know if $\pi$ has this property, but we don't know it doesn't. It appears to have this property in base $10$, but we can't prove it, yet, and "appears" is always a bit of nonsense when we are saying, "We've checked the first $N$ examples out of infinity."

So, as Cameron commented, you are not going to find anybody here who is going to be able to prove that it doesn't occur, since, if we could, we'd have answered a long unresolved question.

If $\pi$ acted like a string of random digits, then you'd expect to have to check on the order of $10^{10}$ or $10$ billion digits before you found $1234567890$. If you tested $1$ trillion digits and still didn't find this sequence, I'd be shocked. But I don't know where you can download $1$ trillion digits of $\pi$...

In the first 1 billion digits of $\pi$, I found two instances of $123456789$, but no instances of $1234567890$.

Here's a simple example. In the first billion digits, there were $10049$ instances of $12345.$ There were $969$ instances of $123456$. There were $97$ instances of $1234567$. There were $9$ instances of $12345678$. And there were two instances of $123456789.$ If the digits of $\pi$ were random, we expect that approximately one tenth of the instances of $123456789$ in any sample would have next digit $0$.

Thomas Andrews
  • 164,948
  • 17
  • 196
  • 376
  • +1, side note, if each digit is 1 byte (?), then one would need a terrabyte drive to download 1 trillion digits(?) ( (?) stands for signifying a shot in the dark try) – jimjim Jun 28 '13 at 13:08
  • There is a highly up voted question on SO about computing pi, with an answer by Mystical who reports on computing 10 trillion digits of pi. More info can be found at Numberworld.org (posting from my phone so linking is inconvenient). – hardmath Jun 28 '13 at 13:17
  • I found a site that used to host the previous record of $5$ trillion digits, but they had to take them down due to bandwidth issues. That appears to be the same site you mentioned with the $10$ trillion digits, @hardmath – Thomas Andrews Jun 28 '13 at 13:32
  • The link to SO that @hardmath mentioned: http://stackoverflow.com/a/14283481/7061 It covers how to compute $\pi$, rather than properties of $\pi$. – Thomas Andrews Jun 28 '13 at 13:38
  • @ThomasAndrews: Thanks for adding the link. It seems a terrabyte drive would likely permit the computation of the first occurrence in pi of 1234567890. So the method of computation may be of interest to the OP. – hardmath Jun 28 '13 at 13:46
  • 2
    Well, I was being very conservative suggesting a trillion digits - we'd actually expect to see his sequence $100$ times in a trillion digits. Just wanted to give an extreme cutoff - if he hasn't found the string in that period, he might actually have something :) – Thomas Andrews Jun 28 '13 at 13:51