Given a number, such as $5^{9^6}$, how would I find the $n^{th}$ digit? (say the $87^{th}$ digit)
I considered the "Digits" command, but that only controls the amount of digits after the decimal, so I can't find any use for it for integer values. Any hints or useful commands would be appreciated. Thanks.
This procedure:
takes as input natural numbers $n$ and $k$ and returns the $k^{th}$ digit of $n$.
For example
nthdigit(5^(9^5), 87);
returns 8.