Is there an O(1) operation to find the Nth digit of Pi?

1.3k Views Asked by At

I'm afraid that 10 minutes of googling isn't finding references to a paper that I thought existed. I remember seeing some years ago a reference to a paper that claims to have proven an algorithm that can return a single Nth digit of Pi in constant time (O(1)).

Does anyone know the reference I'm thinking of? Was it disproven or a hoax?

1

There are 1 best solutions below

2
On

Any $O(1)$ algorithm would have to use only $N$ digits of the input $n$, for some $N$, and that would mean the output would repeat. So there is no algorithm that is $O(1)$ to compute then $n$th digit of any irrational number.

There is no known good algorithm for finding the $n$th base $10$ digit of $\pi$ without effectively computing the prior digits. There is such an algorithm for base $16$. I'm not sure what the algorithm's efficiency is.