I know that there is a formula that allows one to calculate the n-th hexadecimal digit of pi without calculating the previous digits. But is there an analogous formula for decimal digits? I conjecture that there isn't. However, to rigorously prove that there isn't, one needs to define what a "formula" is. Has anyone rigorously done this, and either given an explicit formula, or proven that there isn't one?
Is there a formula that allows you calculate the n-th decimal digit of pi without calculating the previous digits
decimal-expansionpi
Related Solutions
If the irrational number is algebraic of degree two (i.e. is a root of a quadratic polynomial with integer coefficients), then there is a fairly reliable way to make an informed guess about the original value. Your sample case falls into this category, being equal to $10^{16} \sqrt{13} - n$ for some integer $n$. It's important to note that the vast majority of irrational numbers don't fall into any special category, let alone this particular one.
You will want to look up continued fractions. If the irrational is of the very special type I described above, then the continued fraction will be eventually periodic (infinitely repeating), very analogous to a decimal expansion being periodic for rational numbers.
Now, granted, if you only have a finite number of digits you can only extract a finite number of terms in the continued fraction expansion, so you can never have enough precision to be absolutely sure of the number's identity. Nevertheless, if you have 10000 digits you can likely extract thousands of terms. If you see that the terms look like, say,
$$[3; 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 3, 23, 8, 4, 3, 23, 8, 4, 3, 23, 8, 4, 3, 23, 8, 4, 3, 23, 8, 4, \ldots]$$
and that the patten of "8, 4, 3, 23" continues repeating thousands of times until you reach the precision allowed by your input sample, it would be reasonable to guess that it continues forever, and then there are simple ways to compute the exact value that it would be assuming that is the case.
The architect's answer, while explaining the absolutely crucial fact that $$\sqrt{308642}\approx 5000/9=555.555\ldots,$$ didn't quite make it clear why we get several runs of repeating decimals. I try to shed additional light to that using a different tool.
I want to emphasize the role of the binomial series. In particular the Taylor expansion $$ \sqrt{1+x}=1+\frac x2-\frac{x^2}8+\frac{x^3}{16}-\frac{5x^4}{128}+\frac{7x^5}{256}-\frac{21x^6}{1024}+\cdots $$ If we plug in $x=2/(5000)^2=8\cdot10^{-8}$, we get $$ M:=\sqrt{1+8\cdot10^{-8}}=1+4\cdot10^{-8}-8\cdot10^{-16}+32\cdot10^{-24}-160\cdot10^{-32}+\cdots. $$ Therefore $$ \begin{aligned} \sqrt{308462}&=\frac{5000}9M=\frac{5000}9+\frac{20000}9\cdot10^{-8}-\frac{40000}9\cdot10^{-16}+\frac{160000}9\cdot10^{-24}+\cdots\\ &=\frac{5}9\cdot10^3+\frac29\cdot10^{-4}-\frac49\cdot10^{-12}+\frac{16}9\cdot10^{-20}+\cdots. \end{aligned} $$ This explains both the runs, their starting points, as well as the origin and location of those extra digits not part of any run. For example, the run of $5+2=7$s begins when the first two terms of the above series are "active". When the third term joins in, we need to subtract a $4$ and a run of $3$s ensues et cetera.
Best Answer
A few months ago Plouffe find a formula for obtaining the $n$-th digit of $\pi$ in base $10$:
https://arxiv.org/abs/2201.12601