# An amazing approximation of $e$

As we can read in Wolfram Mathworld's article on approximations of $e$, the base of natural logarithm,

An amazing pandigital approximation to e that is correct to $18457734525360901453873570$ decimal digits is given by $$\LARGE \left(1+9^{-4^{6 \cdot 7}}\right)^{3^{2^{85}}}$$ found by R. Sabey in 2004 (Friedman 2004).

The cited paragraph raises two natural questions.

1. How was it found? I guess that Sabey hasn't used the trial and error method.
2. Using which calculator can I verify its correctness "to $184\ldots570$ decimal digits"?
• "Using which calculator..." that is not math within the scope defined by the help center, but the first question is answerable. Commented Sep 28, 2016 at 13:37
• It is not that astonishing, once we realize it is a small variation on $$e=\lim_{n\to +\infty}\left(1+\frac{1}{n}\right)^n$$ Commented Sep 28, 2016 at 13:41
• @JackD'Aurizio The astonishing bit is the pan-digitality, I think. Commented Sep 28, 2016 at 13:46
• The Friedman reference is www2.stetson.edu/~efriedma/mathmagic/0804.html See also quora.com/… and stackoverflow.com/questions/4721650/checking-approximation-of-e Commented Sep 28, 2016 at 13:46
• An even better approximation comes from $$e-\left(1+\frac{1}{n}\right)^{n+1/2}=-\frac{e}{12 n^2}+O\left(\frac{1}{n^3}\right).$$ Commented Sep 28, 2016 at 13:51

\begin{aligned} (1+9^{-4^{42}})^{3^{2^{85}}} &=(1+9^{-4^{42}})^{3^{2*2^{84}}}\\ &=(1+9^{-4^{42}})^{9^{2^{84}}} \\ &=(1+9^{-4^{42}})^{9^{4^{42}}}\\ &=\Bigl(1+\frac1{9^{4^{42}}}\Bigr)^{9^{4^{42}}}\qquad\text{where }=\left(1+\frac1n\right)^n. \end{aligned} This is just the limit definition of $e$ with a large number as an approximation for $\infty$.

Edit: Numberphile just did a video on this, which also gives a pandigital approximation for $\pi$, but it's only accurate up to ten digits.

• Wow! So it is just a joke..?
– Eric
Commented Sep 28, 2016 at 14:54
• @Eric It’s like a party trick. Commented Sep 28, 2016 at 14:56
• @Eric No, it's not easy at all to make it pandigital, all digits from $1$ to $9$ are used exactly once. Commented Sep 28, 2016 at 14:57
• @Daniel Fischer Fair enough. Its freaky accuracy isn't a mystery, though. Commented Sep 28, 2016 at 14:59
• That's right, all you need is a large $n$ for that. Commented Sep 28, 2016 at 14:59

This may be best answered by looking for an improvement to that formula, and explaining how to find it.

The basic idea for all those approximations for $$e$$ is to write some large number $$N$$ in two different ways, using exactly the digits from $$2$$ to $$9$$, and then take $$(1+\frac{1}{N})^{N}$$ as an approximation for $$e$$. In Sabey's old (2004) example, he writes $$N_{old}=3^{2^{85}}=9^{4^{6*7}}$$. However, using a small digit like $$3$$ as the base of the exponential tower isn't optimal. For example, if we could find a way to replace the $$3$$ by a $$5$$, that would make $$N$$ much larger, and the resulting approximation much better...
Finding such an $$N$$ that works actually isn't too hard: Using $$N_{new}=5^{3^{84}}$$ frees up the digit $$2$$, which conveniently can be used to write $$\frac{1}{5}$$ as either $$.2$$ or $$0.2$$, depending on how you like to write your decimal numbers. At the same time, we have lost access to the digit $$4$$, which we have to take care of: Using properties of the exponential function, we can write $$N_{new}=5^{9^{42}}=5^{9^{6*7}}$$. The digit $$4$$ is no longer needed, so $$(1+.2^{9^{6*7}})^{5^{3^{84}}}$$ or $$(1+0.2^{9^{6*7}})^{5^{3^{84}}}$$ is a valid pan-digital solution, which is equal to $$e$$ up to $$8368428989068425943817590916445001887164$$ decimal places.
I'd be surprised if even this new solution was optimal. I replaced the digit $$3$$ by a $$5$$ in the base of the exponential tower, but using any of the digits $$6$$ through $$9$$ could lead to an even better solution. Maybe give it a try yourself!

The formula $$e=\lim_{N\rightarrow\infty}{(1+\frac{1}{N})^{N}}$$ actually approaches $$e$$ in a very predictable way. If you have an approximation $$(1+\frac{1}{10^{n}})^{10^{n}}$$, it will differ from $$e$$ by exactly $$1.359...\times10^{-n}$$, regardless of the value of $$n$$ (which can be any sufficiently large number). As a consequence, the number of correct decimal digits will always be equal to either $$n$$ or $$n-1$$. In general, $$(1+\frac{1}{N})^{N}$$ will be correct up to $$\log_{10}{N}$$ digits (or sometimes one less).
The number $$3^{2^{85}}$$ has $$18457734525360901453873570$$ digits, and Sabey's approximation is correct to that number of decimal places. The new solution $$5^{3^{84}}$$ has $$8368428989068425943817590916445001887165$$ digits, and my approximation turns out to be correct to $$8368428989068425943817590916445001887164$$ decimal places.
Unfortunately, I am not aware of an online calculator that will tell you whether a particular approximation is correct to $$n$$ or $$n-1$$ digits, respectively, but maybe you're okay with knowing the answer to within $$\pm 1$$? You can check the size of $$N_{new}$$ using WolframAlpha.