If I wanted to find the 3,257,001st (for example) number in Pi, how would I do it? Is there a website or a sequence generator?
Thanks.
If I wanted to find the 3,257,001st (for example) number in Pi, how would I do it? Is there a website or a sequence generator?
Thanks.
It’s a 3!
If you want it in base 10, the only (known) way to get it is by generating all of the digits out to that point (or by finding someone else who has done so). Amazingly, though, if you want it in base 16 (or base 2 or any other base that’s a power of 2), there’s actually a formula that will find digits individually.
Simon Plouffe seems to claim otherwise.
Thanks but how did you find it?
How many digits do you need? There are both websites with hundreds of billions of digits (or more) that you can download (here is a billion to get you started) and programs to generate them yourself (eg try Super Pi).
Plouffe, for shits and giggles also co-founded the On-Line Encyclopedia of Integer Sequences, one of the most extraordinary things on God’s green Earth.
You got numbers? They got numbers.
Cx: “Co-founded” is wrong. OEIS started out, and was and is shepherded by Neil Sloane.
Maybe my OP wasn’t clear. Here is Pi:
3.14159265…
If i wanted to know what the 2nd number in Pi was (past the decimal) I could just count. It’s 4. If I wanted to know what the 7th number was I could just count - it’s 6. But what if I wanted to know what the 34,346th number was? I could go to your link and count but that would take while. Or maybe I was looking for the 670,934th number?
Given that there is a list of a billion digits, I was hoping that there was a program that could search through them and tell me what the numeral was at a specific number count past the decimal.
This site looks like it has promise:
You might expect that you’d need to go out a million digits or so before encountering six consecutive 9’s. But (disturbingly!) there is a such a run after only 762 digits. Douglas Hofstadter wanted to memorize pi far enough to be able to say
Pi is 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196442881097566593344612847564823378678316527120190914564856692346034861045432664821339360726024914127372458700660631558817488152092096282925409171536436789259036001133053054882046652138414695194151160943305727036575959195309218611738193261179310511854807446237996274956735188575272489122793818301194912983367336244065664308602139494639522473719070217986094370277053921717629317675238467481846766940513200056812714526356082778577134275778960917363717872146844090122495343014654958537105079227968925892354201995611212902196086403441815981362977477130996051870721134999999 and so on
… and get listener running for the .99999… = 1? thread … but he was only able to memorize about half-way.
In the first link provided by Dr. Strangelove, put 34346 in the “starting position” text box, click on the “show pi”, and the first number that pops up in the string of 10 is the 34,346th digit in Pi.
Does pi contain itself?
That is, for any n however large, can I find the first n digits of pi somewhere else farther along in the number?
(Just thinking a bit about this: If so, then it must occur farther than n digits into the number.)
No one knows. If pi is a normal number, then yes. And most likely, pi is a normal number, but no one has a proof of this.
Thinking about it a bit more: Forget the above.
A couple of questions about this:
The formula given at the top is the hypergeometric identity [sub]2[/sub]F[sub]1/sub = π + 3. What is the clearest (in your opinion) way to see this?
The method outlined claims to compute the n’th digit in time Cn^3log(n)^3. Practically speaking, how does that compare to the methods currently used to compute many trillions of digits via summing terms of Chudnovsky-type series? I do understand that Plouffe’s goal is to save storage space, not necessarily time (on the other hand, continuously reading and writing 100s of terabytes to hard disks takes time).
First, a nitpick: by “number” I think you mean “digit.” Pi itself is a number.
If you’re willing to settle for finding a specific digit in the binary (base two) or hexadecimal (base 16) expansion of Pi, you could use the Bailey–Borwein–Plouffe formula formula, alluded to upthread. I don’t think—someone correct me if I’m wrong—that there’s any currently known way of finding a specific digit in the decimal expansion of pi without finding all the digits up to that point.
It’s all been pre-calculated, though. Post #12 answers the question in the OP (to the limits of the current version of that web site, currently 200 million digits or something like that).
ETA by “all… pre-calculated” I mean low-order digits like the 3257001st one the OP wanted, not multi-quadrillions and beyond.
Is there some particular application you want this for? If you’re using it for cryptography or randomness, you could treat the value of pi as text instead of as numeric. Make a text file with pi written out as far as you need it to go, then use a Mid(x, 1)-like function (you may need to break the string into chunks) or just go through the text file to the xth character (or x + 2 if you’re keeping the initial “3.” in the file). Then convert the return value from a string to an integer.
I just made a text file of pi to the 10-millionth digit, and the file is only about 9900 kb.
I don’t know much about the Chudnovsky algorithm or why it’s used. However, I have implemented the Borwein quadratic algorithm. It doubles the number of digits on each step, so there’s a log(n) term. Each step requires some square roots and divides, which themselves have quadratic convergence algorithms, so there’s another log(n) factor. Finally, the root/divide steps require multiplies, which can be done in n*log(n) time using a fast fourier transform or other fast convolution method.
That multiplies out to O(n*log(n)[sup]3[/sup]), which is a difference of n[sup]2[/sup]. So yeah, this is really only of theoretic concern.