Find the nth digit of Euler's number Challenge

Given a positive integer n, you must calculate the nth digit of \$e\$, where \$e\$ is Euler's number (2.71828...).

The format of the output can be a number or a string (e.g., 3 or '3')

Example

# e = 2.71828...

nthDigit(3) =&gt; 8
nthDigit(1) =&gt; 7
nthDigit(4) =&gt; 2


Shortest code wins.
Python 2, 34 32 bytes

Solution provided by @l4m2
-2 bytes thanks to @xnor



lambda n:`(100**n+1)**100**n`[n]


Try it online!

Very,  very slow.

Verification up to \$166\$ digits. The idea for this verification comes from @l4m2: calculates \$x^{100^n}\$ by calculating x=x**10 repeatedly (\$2n\$ times), each time truncating \$x\$ to a few left most digits (the TIO link uses \$500\$ digits). By changing the truncation to round down or up, we obtain the lower and upper bound for the result. If the lower and upper bound agree to \$n\$ leftmost digits, we know that the exact calculation will also result in those \$n\$ digits.

I have verified that this solution works up to \$n = 333\$, using MAX_DIGITS = 1000.

How

This solution uses the following well known approximation of \$e\$:
$$ e = \lim_{x \to \infty} \left(1 + \frac{1}{x} \right)^{x}$$
Substituting \$x = 100^n\$, we have:
$$ e = \lim_{n \to \infty} \left(1 + \frac{1}{100^n} \right)^{100^n} = \lim_{n \to \infty} \frac{\left(100^n + 1 \right)^{100^n}}{\left(100^n\right)^{100^n}}$$
Since the denominator is a power of \$10\$, we can ignore it entirely.

According to this analysis on Math SE, the worst case error of this approximation is:
$$ \Delta &lt; \frac{3}{x} = \frac{3}{100^n}$$
which means roughly that every time \$n\$ increases by \$1\$, we gains 2 digits of precision.