A formula for the nth digit of đťś‹ and đťś‹^n
arxiv.org
arxiv.org
He used to teach in my university. He is a fantastic man. This is serious, he is crazy about numbers. He is one of the guy behind OEIS (oeis.org).
That is not the first formula he found about pi and some of the previous one had been used to break world record about the number of known decimals.
In my very personal opinion, the overall publication history of the three provides some rather good evidence for Plouffe's claims.
In fact, I wasn't sure about the full story but the fact that Wikipedia repeatedly told that Plouffe alone discover the formula makes me think that there is a story behind that.
In other words, for say đťś‹^50 does the formula only give me the 50th digit, or does it give me any arbitrary digit I want?
The abstract and text say the nth digit of \pi^n, and the worked example on page 2 uses the same n=1000 to find the thousandth digit of \pi^{1000}.
And this was by taking 4 terms of the zeta function infinite product expansion. 2xn digits would presumably be given by taking more terms (but quite a few, one for every prime under 100, so in some sense this method has bad convergence when you want the mth digit of pi^n and m >> n).
There's a bit on page 5 about how the Chudnovsky method totally blows this approach out of the water.
Yes.
> In other words, for say đťś‹^50 does the formula only give me the 50th digit
Yes.
> or does it give me any arbitrary digit I want?
It gives you the n-th digit of \pi^n. Here n is arbitrary.
For example, let’s say we need one atom for each digit of pi that we want to store, the max limit of digits of pi would be something like the total number of atoms in the universe, minus the atoms required to compute and store the digits.
Has that been studied/calculated?
A computer can calculate and hold a lot more than 63 digits.
So I guess my question is more like: if the universe was just one big computer dedicated only to calculating (and storing) digits of pi, how many digits could it get to calculate, max?
Although because pi is a transcendental number maybe it is impossible to have an algorithm to return the n-th digit in O(1) operations? Does anyone know ?
Upd: thinking more about it, just to read all the digits of number n, one needs log(n) operations, so I guess anything that has performance of O(log(n)) can be considered easy (i.e. the digits of rational numbers can be computed in O(logn).
[1] https://en.wikipedia.org/wiki/Bailey%E2%80%93Borwein%E2%80%9...
There are transcendental numbers where the n-th digit can be computed in O(log n) like Champerowne constant though.
cmeacham98's constant: a number where the `n`th digit is the `2^n`th digit of pi
Sure, here is a function in Python that calculates the nth digit of Pi using the Chudnovsky algorithm:
from decimal import *
def nth_digit_of_pi(n):
getcontext().prec = n + 1
C = 426880 * math.sqrt(10005)
M = 1
L = 13591409
X = 1
K = 6
S = L
for i in range(1, n):
M = (K ** 3 - 16 * K) * M // i ** 3
L += 545140134
X *= -262537412640768000
S += Decimal(M * L) / X
K += 12
return +str(S / C)[n]
Seems off, but I learned something: https://www.wikiwand.com/en/Chudnovsky_algorithm Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'manojlds' object has no attribute 'humour'. Did you mean: 'joke'? >>> from decimal import Decimal
>>> import math
>>>
>>> def nth_digit_of_pi(n):
... getcontext().prec = n + 1
... C = Decimal(426880 * math.sqrt(10005))
... M = 1
... L = 13591409
... X = 1
... K = 6
... S = L
... for i in range(1, n):
... M = (K ** 3 - 16 * K) * M // i ** 3
... L += 545140134
... X *= -262537412640768000
... S += Decimal(M * L) / X
... K += 12
... return str(S / C)[n]
...
>>> "".join([ nth_digit_of_pi(i) for i in range(50) ])
'0.318309886183790698041462054251035408427213165074'> It is easy to verify that with n = 1000, the error on π is of the order of 0.293193 x 10^-303, which is less than 2^-1000. So the thousandth position of this expression is the 1000th bit of the number π.
How does that follow? Take the number 1 - 2^-n. The difference between this number and 1 is 2^-n by definition, so it can be made arbitrarily small by varying n, but all bits are wrong. Addition can propagate all the way to the "decimal" point (and even beyond), so an error bound doesn't normally say anything about individual bits or digits. What am I missing here?
Could someone who is a practicing mathematician speak to the practical application of this? From what I understand from reading this seems like an interesting curiosity but the Chudnovsky formula it refers to seems to be better at doing the same thing for any practical purpose.
https://www.johndcook.com/blog/2023/01/16/pi-bernoulli-numbe...
This seems to be the catch.
n => Math.PI.toString()[n+2]It's another way to help verify super long calculations of pi are correct, and in turn I guess one basic "practical application" of calculating pi to many digits is as part of the suite for verifying new hardware. How do you know that fancy fresh new silicon is actually crunching the numbers correctly, not producing garbage in some subtle way at enough significant digits? While there are lots and lots of checks used to avoid a repeat of hardware bugs of days past (like the forever infamous Pentium FDIV), one simple sanity check/stress test is calculating out numbers like pi a bunch of different ways to huge numbers of digits and making sure the result is always correct. If it's not there's clearly a problem somewhere.
http://en.wikipedia.org/wiki/Normal_number
This is particularly exciting because the prevailing opinion had been that we lack the mathematical tools to attack that problem.
Basically the work will be give me starting index from which, next N digits are = "45334138023580". Finding the first digit can take ages while verification is O(1)ish.
Imagine that to provide storage systems similar to IPFS, but the blockchain network only stores the metadata and no data!
That is not the formula.
We know exactly how much time we need to compute the nth digit of pi. But how much time do we need to find a specific string of digits? Seems like a more interesting question.
It also stimulate the imagination: what other transcendental numbers might this work with? How long do you have to search in the digits to find your string? What can you say about the size of the index (how far you searched) vs your string length? Etc. It's patterns all the way down.
Looks to me like nfs is simply transforming a binary space index into a pi-space index. Some files may compress to a smaller value than they are in binary space (if you get lucky), but make no mistake, some files will be much much larger (i.e. the files you're trying to store don't show up in pi until an index value that is a virtually infinite number of digits long).
Why is this thing so slow? It took me five minutes to store a 400 line text file!
Well, this is just an initial prototype, and don't worry, there's always Moore's law!
So I'm guessing they are quite aware of the joke, and props to them for the dedication to commit and write the code (or the other way around) :)
The library of babel could be a good "useless" backing though https://libraryofbabel.info/bookmark.cgi?hnexample
It takes the input, converts it into N, then calculates position using the N.
Thank you. I argued for a long time simply by being ignorant.
good bless ya sir.
> What will the super computers going to do in view of this discovery?
Whatever they do now. It’s not like this is what supercomputers are built for. Computations like these more are used to get confidence that the hardware works.
No one's saying it is, this is arXiv, after all (not a journal). Still a fun little interesting paper, though.
Now, for the hype, I don’t see any from the authors.
The thing that is actually special about the digit 0 is that it is implied for all positions for which no digit is given. That is, when we write
1.2
we really mean …00000001.20000000…0 recurring represents the end of a quantity, and the absence of any further quantity, forever.
Eg: 0.012500000000000...
The significant portion is 0.0125 - the recurring zeroes serve a mathematical role akin to that of a full-stop in a sentence. Hence zero being (jokingly, but in a sense truthfully) always the "last digit".
I will grant that in base-π, π is 10, however.
Proof: the first digit of pi is 3, not zero.
That aside, the apparent "empty space" on the either side of a number is in reality consisting of infinite zeroes.
Just because we typically choose to "display" most numbers without those zeroes, it doesn't mean they aren't there in a very real, practical and important sense.
They are there, because if they aren't there, then something else might be, and then all our numbers would have to be assumed to be wrong or incomplete... so instead, we assume the zeroes.
The terrible reality is the zeroes extend off infinitely in either direction, and we use empty space as shorthand for this so we don't have to spend longer than the age of the universe to write a single number with full accuracy.
const nDigitOfPi = (n) => (22/7).toString()[n+1]
For example, https://arxiv.org/help/jref says:
> When a article is published, the author may wish to indicate this in the abstract listing for the article. For this reason, the journal reference and DOI (Digital Object Identifier) fields are provided for articles.
This can only make sense if "public abstract on arxiv" is not the same as "published" in the way you mean.
I mean, there's always going to be today's 10,000 [1] who doesn't know what, say, "VB.NET"[2][3] means.
[2] https://news.ycombinator.com/user?id=kwhitefoot
[3] https://en.wikipedia.org/wiki/Visual_Basic_(.NET)
But explaining or footnoting everything defensively, rather than pointing out misconceptions as they arise, seems excessive.
Further, someone may deliberately use a minority definition in order to stress a philosophical point. One valid viewpoint is that a publication is a publication is a publication. A preprint, a blog post, or a peer-reviewed journal publication should be given equal weight as being "published." I'll call this position #1.
Another valid point is that some works are incomplete, and may go through multiple drafts before reaching the final, "published" form, which it's best known by, and is likely the most polished of the versions. I'll call this position #2.
Often people want feedback, and one way to get feedback is by publishing a preprint. (There are others. I recall reading of a mathematician, about a century ago, who would first publish in his home country, and native language, to get friendly feedback from colleagues, before publishing in English. He's cited for his later publication.)
Someone who holds position #1 might fully understand that I use the dictionary with position #2, and still deliberately use position #1 in order to popularize that #1 dictionary. The difference isn't one of confusion or lack of knowledge, but one of viewpoints.
Let me be clear - I'm not saying that that's the case here. Instead, my example is meant to show it's not necessarily so simple as "shares the same dictionary" or not.
Furthermore, this thread started with someone complaining about the lack of polish which the publication process can provide.
commandlinefan's earlier negative aside concerned language quality.
IMO, I think people hold peer-review journal published papers to a (slightly?) higher language quality standard than what may be the first of several preprints. And I think anamexis was pointing out that difference.
As Wikipedia says: "The immediate distribution of preprints allows authors to receive early feedback from their peers, which may be helpful in revising and preparing articles for submission." https://en.wikipedia.org/wiki/Preprint
I expect that may include identifying and fixing typos.
and you shouldn't. As long as it is somewhat legible, forcing people who are not native English speakers to conform to another language 100 % in order for their science to be published is horrendous.
There was a time 300 years ago, where great thinkers who did not speak French or German could not publish their thoughts and answers, and to us now it seems atrocius. Let us not go a head and redo that with English
Edit: A possible solution would be to have "good idea, please language edit and send back for further review" as an option along with "reject" / "needs major revisions" / "needs minor revisions" / "accept".
If you say so - but honestly, why not just publish it in French then (I think the author is French)? If I were publishing something in French - technical or scientific or otherwise - I’d want it to be reviewed by a native speaker.