34
$\begingroup$

$e^\pi-\pi\approx 19.99909998$

Why is this so close to $20$?

$\endgroup$
  • 14
    $\begingroup$ by chance (6 more to go...) $\endgroup$ – Jimmy R. Mar 24 '14 at 15:51
  • 39
    $\begingroup$ It's not close at all. There are infinitely many numbers closer than that. $\endgroup$ – Asaf Karagila Mar 24 '14 at 16:15
  • 22
    $\begingroup$ Obligatory link: xkcd.com/217 $\endgroup$ – Eric Lippert Mar 24 '14 at 17:26
  • 17
    $\begingroup$ The $0$ at $10^{-4}$ removes any relevance of the $9998$ that follows... $\endgroup$ – e2-e4 Jan 3 '16 at 14:50
  • 3
    $\begingroup$ Though these comments are somewhat old, the argument that "[there] are infinitely many numbers closer" is unconvincing. For if the difference was, say, $10^{-10^{9}}$ or some other ridiculously tiny number, one could still employ that argument but I don't think many would accept it then. The reason for this is perhaps psychological, and perhaps that other near-integers (ie. Ramanujan's constant) are near-integers for a reason. $\endgroup$ – MathematicsStudent1122 Jan 4 '16 at 0:19
34
$\begingroup$

You may find :

This curious near-identity was apparently noticed almost simultaneously around 1988 by N. J. A. Sloane, J. H. Conway, and S. Plouffe, but no satisfying explanation as to "why" $e^\pi-\pi \simeq 20$ is true has yet been discovered.

after some googling.

| cite | improve this answer | |
$\endgroup$
  • 3
    $\begingroup$ It's probably no accident that this is the very same S. Plouffe who coined the name "Ramanujan Constant" for the almost-integer $e^{\pi\sqrt{163}}$. $\endgroup$ – Roland Jan 14 '16 at 10:26
  • 3
    $\begingroup$ well now this answer has exactly 20 upvotes, no approximation necessary $\endgroup$ – Alex Sep 30 '16 at 10:59
42
$\begingroup$

It cannot be accidental in the real sense. It is either special or typical. Observe that in almost all such equations it is always something else in disguise. For example, in many cases you can reduce numbers to their rational approximations and explicitly check everything.

Instead of just using approximation, you can find some simpler connection and argue about extreme values or something that is going to give you a common reason for the equation.

One of the examples of this procedure is given in: Prove $\left(\frac{2}{5}\right)^{\frac{2}{5}}<\ln{2}$

and I will illustrate here how we can check your statement above using the simple approximation of $\pi \approx \sqrt{10}$. This is probably not sufficient on its own for immediate success but it gives you the flavor of the method, and it gives you some estimation to work around, especially, it specifically explains that it is not $e$ or $\pi$ in many similar equations, it is just something that looks like it.

So the equation we are interested in becomes

$$y^{\sqrt{x}}-\sqrt{x}=20$$

The solution is of course

$$y=(\sqrt{x}+20)^{\frac{1}{{\sqrt{x}}}}$$

We can expand it around 0 and get

$$(\sqrt{x}+20)^{\frac{1}{{\sqrt{x}}}} = e^{\frac{1}{{\sqrt{x}}}\ln{(\sqrt{x}+20)}} \approx e^{\frac{\ln(20)}{\sqrt{x}}+\frac{1}{20}-\frac{\sqrt{x}}{800}+...}$$

For the sake of simplicity we will ignore the terms beyond $-\frac{\sqrt{x}}{800}$ and simply try to solve

$$\frac{\ln(20)}{\sqrt{x}}+\frac{1}{20} = 1 $$

This gives

$$x=\frac{400\ln{20}^2}{361}$$

Well now it is easy

$$\frac{400\ln{20}^2}{361} \approx \frac{400\ln{20}^2}{360}=10(\frac{\ln{20}}{3})^2$$

and now comes the simple part $\ln(20)=2.995 \approx 3$ making $(\frac{\ln{20}}{3})^2 \approx 1$ and $x \approx 10$ as expected which is the key reason for the equation itself.

This is all telling you that you are right, but something is still missing.

What remains is to justify the remainder.

$$e^{\pi}-\pi=e^3 \cdot e^{\pi-3}-\pi=20$$ $$20 e^{\pi-3}-\pi \approx 20$$ $$e^{\pi-3}\approx 1+\frac{\pi}{20}$$

I hope that you can see the game here. $0.14$ is still small enough for reasonable estimation of $e^{\Delta{x}}=1+\Delta{x}$ and at the same time $$\frac{\pi}{20} \approx 0.15 \approx \pi - 3$$

So this last part is essentially $$e^{\pi-3}\approx 1+\pi-3 \approx 1+\frac{\pi}{20}$$

As you can see the equation in question is not much more than a game of two combined "accidents" $\ln(20) \approx 3 \; \; \; (1)$ and $\frac{\pi}{20} \approx \pi - 3 \; \; \; (2)$

We can establish a strict form and write

$$e^{3+x}-(3+x)=e^3$$

This has a nice solution in form of Lambert function

$$x=-W_{-1}(-e^{-e^3})-3-e^3 \approx 0.1454$$

but this is just rephrasing all what we have said already.

The key reason for the entire conundrum is obviously $$-W_{-1}(-e^{-e^3})-e^3 \approx \pi$$

Observe that the true nature of it is given by the approximations (1) and (2). This last is just all that at more sophisticated level. Still it has not much to do with $\pi$ itself, just with its value, as strange as this may sound.

You may ask, ok, but why do we have $\ln(20) \approx 3$? That is strange on its own. You can approach this by using some series for $e^x$ and argue about the zeros or you can again use something like

$$\frac{e^{x+1}}{5x}-x$$

and find that this has a minimum around $x=1.99...$ since it is achieved for $e^{x+1}(x-1)=5x^2$ and even just by looking at it you can see that $x \approx 2$ providing $e^3 \approx 20$ or the other way around.

I would truly consider the approximate thing of $e^{\pi}-\pi \approx 20$ as very much solved by this analysis.

For some reason unknown to me, it will not be that fast to find this or some derived explanation around the Internet. It can't be all that there is to it, can it?

Unless you want to add a factor or two more to justify maybe one digit more it is indeed all that there is to it: $\ln(20) \approx 3$ and $\frac{\pi}{20} \approx \pi-3$

(The reason I have used $\sqrt{10}$ for $\pi$ is to have something to check the estimations without going more close to the value of $\pi$ itself. Using $\sqrt[3]{31}$ we can achieve somewhat better accuracy but that is not completely necessary at first.)

If you are still in doubt simply draw an implicit graph $y(x)$ of

$$e^{x(1+\frac{1}{e^{y}})}-x(1+\frac{1}{e^{y}})-e^{y}=0$$

and notice how fast after 1 it becomes very close to $y(x)=x$. As an exercise you may even try to find derivative of this function.

enter image description here

In that sense this has not much to do with $\pi$ itself, it is something else in disguise.

Few additional notes:

Since we got very close, I will explain the final steps leading more precisely to the approximation. We start from

$$e^{3+x}-(3+x)=e^3$$

and realize that $e^3$ is a little bit larger than $20$. We rewrite it all as

$$e^{3+x}-(3+x)=e^{3-y}$$

and now all values are small so we can use linear approximation getting

$$(e^{3+x}-1)\mathrm{d} x=-e^{3-y}\mathrm{d} y$$

which makes

$$\mathrm{d} y = -\frac{(e^{3+x}-1)}{e^{3-y}}\mathrm{d} x$$

or with all things we know so far it is

$$\mathrm{d} y \approx -\frac{22}{20}\mathrm{d} x$$

We would like to reduce $x$ by about $0.003899$, which requires increasing y by about

$$\frac{22}{20}0.003899=0.0042889$$

Notice now that $3-\ln(20)=0.00426...$ almost precisely the figure we need in order to reach $20$ from $e^3$. Regardless of this last precision details, we could say that we are by chance almost as close to $ln(20)$ in one case as we are to $\pi$ in another. This is not what is creating the approximation completely, this last is just adding a digit or two to the result because it can.

These last details are somewhat self-regulating since we are using linear approximations that are adding by themselves a digit or two more and the functions used are constantly some sort of $e^x$ so the needed ratio remains. What looks like some sort of chance (or design) is that all figures are sufficiently and relatively precisely close to each other so that we can use linear approximations and confirm that they are even closer.

Last but not least is indeed magic. Once we have reached a proximity of probably below fifth or sixth decimal digit, we allow ourselves a little bit of trickery. Imagine, we have the result of 19.9999999 for some value close to $\pi$, but in order to reach $\pi$ more closely we need 19.9992. We would totally allow this and still be surprised since our sense of being close allows a final margin of error to be just anything. In essence this is a trick since we are actually forcing the result close to what we want at the expense of enlarging the error.

You can find a similar magical effect on many even very serious sources which claim instead of the above that $cos(ln(\pi+20)) \approx 1$. $cos$ is reducing the error around 1 making the result even more "surprising", but unless this form is supported by some deeper theory, it is advisable to keep the form so that the surprising integer effect is lowered. (The form $cos(ln(\pi+20))$ is probably not going into the right direction since even $cos(ln(\pi+21))$ or $cos(ln(\pi+19))$ is "close" to 1 then.)

Far from being a complete trick, these almost integers are hiding some properties of the constants we know so well, which we would not be aware of otherwise.


All the above is saying why we have these two numbers so close, but it does not say if the situation is special in any particular way. If you run a simulation of around the same size random numbers, minimizing the value $av_{1}+bv_{2}+c$ you will notice that this behavior together with the error term below 0.001 is typical, you find about one or two solutions that use integers, $a,b,c$ in the range [-25,25].

The fact that we have one large integer of 20 is another strong indication that there is no special linear relation between $e^{\pi}$ and $\pi$ that is not within the same rank of two average random numbers in the same range. For example, the testing shows that if there is more than one solution the average of integers employed is lower, and for our case $\frac{20+1+1}{3} \approx 7$ is just about right for the numbers that have one integer connection for the given margin of 0.001. There is no statistical evidence, if you want, that points to any special connection, which is to say that there could be as many as you like without any indication over which one is more correct.

(Of course the situation is simple enough to check all this using the probability theory, but for the moment we were quite happy with the simulation.)


This above is an illustration of the method. It gives the flavor. A full account actually goes over the function

$$-x-W_{-1}(-\frac{1}{e^{x}})$$ which is a solution for $y$ of $e^y-y=x$

We start from $x_{0}=e^3-3 \approx 17$ because $-x_{0}-W_{-1}(-\frac{1}{e^{x_{0}}})=3$

and we want to get to

$$-20 -W_{-1}(-\frac{1}{e^{20}}) \approx 3.1416 \approx \pi$$

We expand $-x-W_{-1}(-\frac{1}{e^{x}})$ around $e^3-3$ getting

$$-20-W_{-1}(-\frac{1}{e^{20}})=3+\frac{23-e^3}{e^3-1}-\frac{e^3(23-e^3)^2}{2(e^3-1)^3}+$$ $$\frac{e^3(23-e^3)^3(1+2e^3)}{6(e^3-1)^5}-\frac{e^3(23-e^3)^4(1+8e^3+6e^6)}{24(e^3-1)^7}+$$ $$\frac{e^3(23-e^3)^5(1+22e^3+58e^6+24e^9)}{120(e^3-1)^9}... $$ getting with first 5 terms $3.14163...$ only to realize that except at first few digits the value has no recognizable connection with $\pi$ itself.

If we make a crude assumption that $e^3 = 20 $ we have that the value is $$\approx 3+\frac{3}{19}-\frac{9\cdot 20}{2\cdot 19^3}+\frac{27\cdot 820}{6\cdot 19^5}-...$$ which nicely explains the logic we have been trying to follow in the text considering the structure of the value of $\pi$.

Another options is to have it all expanded around $x_{0}=20-\ln(20)$, because $-W_{-1}(-\frac{1}{e^{x_{0}}})=20$. And now you need only $\ln(20) \approx 3$ to express the approximation to $\pi$.

$$-20-W_{-1}(-\frac{1}{e^{20}})=\ln(20)+\frac{\ln(20)}{19}-\frac{10\ln^2(20)}{19^3}+\frac{410\ln^3(20)}{3\cdot 19^5}$$ $$-\frac{12805 \ln^4(20)}{6\cdot 19^7}+\frac{215641 \ln^5(20)}{6\cdot 19^9}-\frac{22884241 \ln^6(20)}{36\cdot 19^{11}}+...$$

Finally if you expand around $x_{0}=e^\pi - \pi$ since $-x_{0}-W_{-1}(-\frac{1}{e^{x_{0}}})=\pi$ you have even the error term in a more precise form:

$$-20-W_{-1}(-\frac{1}{e^{20}})=\pi+\frac{20+\pi-e^{\pi}}{e^{\pi}-1}-\frac{e^{\pi}(20+\pi-e^{\pi})^2}{2(e^{\pi}-1)^3}+...$$

And the second term defines the error since the third is already $\sim 10^{-9}$, $\frac{20+\pi-e^{\pi}}{e^{\pi}-1} \approx 0.0004$.

| cite | improve this answer | |
$\endgroup$
  • 3
    $\begingroup$ This is a really nice answer ! Thanks for providing it. $\endgroup$ – Claude Leibovici Jan 5 '16 at 11:04
22
$\begingroup$

The proximity to $\pi$ is purely coincidental, as is often the case. Take for instance the root of the equation $x^4+x^5=e^6$, which is $x=\pi+0.000 000 029$. Many other far more accurate yet equally coincidental approximations are shown on this page: http://www.contestcen.com/pi.htm.

For each of these coincidences, one could be surprised and wonder: "Why is it so close? ". This is a naive question because a particular relationship is especially selected to be close to an exact value and chosen among an infinity of relationships more or less approximated.

One can find very easily as many coincidences as we want, with $\pi$ or/and with other usual constants, thanks to computer automatic search. The general principle of the method is described with examples in the paper "Mathématiques expérimentales" published on Scribd (in French): http://www.scribd.com/JJacquelin/documents.

| cite | improve this answer | |
$\endgroup$
19
$\begingroup$

The right question is why

$$e^\pi-\pi\approx 20-\frac{1}{1111+\frac{1}{11+\frac{1}{\sqrt{2}}}} $$

| cite | improve this answer | |
$\endgroup$
  • 2
    $\begingroup$ Hmmmm.... ${}{}$ $\endgroup$ – Mr Pie Mar 27 '18 at 10:12
10
$\begingroup$

As much as I wish there was some deep connection here, all (lack of) evidence points to the fact that this is nothing but mere, brilliant mathematical coincidence.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ There are actually quite some examples where some operations on transcedental numbers turn out to be extremely close to an integer. Maybe something good for a new post? $\endgroup$ – imranfat Mar 24 '14 at 16:00
  • $\begingroup$ @imranfat maybe a post on a list of coincidences. $\endgroup$ – Guy Mar 24 '14 at 16:05
  • $\begingroup$ @Sabyasachi There are some that aren't coincidences, such as $e^{\pi\sqrt{163}}$ as Geoff mentions. This one is though, IMHO. $\endgroup$ – Alex Becker Mar 24 '14 at 18:50
  • $\begingroup$ @AlexBecker okay I wasn't aware of that. $\endgroup$ – Guy Mar 24 '14 at 18:57
  • 3
    $\begingroup$ you could perhaps argue that nothing is a coincidence, and in time some weird area of number theory (perhaps alien to what we know today) will give this some better explanation than just "coincidence" $\endgroup$ – frogeyedpeas Jan 4 '16 at 4:10
7
$\begingroup$

If you think that's good agreement, try Ramanujan's constant $e^{\pi \sqrt{163}}.$ There is a deep explanation for the proximity in that case though.

| cite | improve this answer | |
$\endgroup$
1
$\begingroup$

Partial Answer

If $e^\pi-\pi\approx20$ then $e^x-x-20$ must have a root around $x=\pi$. Hence the function defined by $z=e^{f(z)}-f(z)-20$ should pass $f(0)\approx\pi$. So with the Lagrange Inversion Theorem, we can find a series representation for $f(z)$. If there's any special reason why $f(0)\approx\pi$, it would explain why $e^\pi-\pi\approx20$. We can find $f(z)$ by inverting $e^x-x-20$ at $x=3$, as follows. *

$$f(z)=3+\frac{[z-(e^3-23)]}{e^3-1}-\frac{e^3[z-(e^3-23)]^2}{(e^3-1)^3\cdot 2!}+\frac{(e^3+2e^6)[z-(e^3-23)]^3}{(e^3-1)^5\cdot 3!}\ldots$$

If we substitute $z=0$ and simplify the series, our question is equivalent to asking why: $$3+\sum_{n=1}^{+\infty}\frac{(23-e^3)^np_n(e^3)}{(e^3-1)^{2n-1}(2n-1)!}\approx\pi$$

Where $p_n(e^3)$ are polynomials in $e^3$. Indeed we see that the left hand side is approximately $3.1416$. This is expected since solving $e^x-x-20=0$ gives us $x\approx 3.141\,633\,302\,801\,037$.

Figure: $\color{red}{y=e^x-x-20}$ in red, $\color{blue}{y=x}$ in blue, $\color{purple}{y=f(x)}$ in purple and the partial sum for $\color{green}{y=f(x)}$ up to $n=3$ in green. The purple curve represents the reflection of the red curve over the line $y=x$. The purple curve crosses the $y$ axis around $(0,\pi)$, implying $e^\pi-\pi\approx20$. Geogebra link: https://www.desmos.com/calculator/nhbpehuuds

Inverted function


Potential Next Steps

The coefficients of $e^{3k}$ for each $p_n(e^3)$ are shown in the table below. For example, when $n=3$, $p_3(e^3)=e^3+2e^6$.

$$\begin{array}{|c|c|c|c|c|} \hline n&\text{Coefficient of }e^3&e^6&e^9\\ \hline 1&0&0&0\\ \hline 2&-1&0&0\\ \hline 3&1&2&0\\ \hline 4&-1&-8&-6\\ \hline \end{array}$$

If you think you can see any particular pattern in the table, or would like to calculate more entries, it could poetntially lead to an explanation.

We could also attempt to compare the terms in the series to a series for $\pi$. Namely $f(0)=3+0.153-0.0123+0.00135-0.000169\ldots$. We could narrow our search to the series for $\pi$ with the same rate of convergence. I think this series has first order convergence.


* We can't invert $e^x-x-20$ around $x=0$ because the derivative is $0$ here. I tried at $x=1$ but couldn't get it to work.

| cite | improve this answer | |
$\endgroup$
1
$\begingroup$

This is my attempt at answering this question - with a twist:

Why isn't $e^{\pi}-\pi$ any closer to 20 than it already is ?

It involves a relation between volumes of unit balls in Euclidean $s-$space, denoted $\nu(s),$ and the functional equation of Riemann's xi-function - $\xi(s).$ Unfortunately it uses some murky notion about the speciality of the number 5 with respect maximal volumes among unit balls - a notion Bill Thurston would disagree with.


It is worth noting that $$ (1-2)\frac{\zeta(2)}{\xi(2)}=\pi $$ Consequently whenever $s$ is an even number, $$ -\sum\limits_{s=2}^{\infty}(1-s)\frac{\zeta(s)}{\xi(s)}=e^{\pi}-\pi $$ Indeed $\nu(s)$ tends to zero as $s\to\infty.$ However the volume of the $s-$ball is always positive and this holds for odd numbered $s,$ as well. Subsequently over all numbers $s,$ $$ e^{\pi}-\pi<-\sum\limits_{s=0}^{\infty}(1-s)\frac{\zeta(s)}{\xi(s)}. $$

At this point I should mention the integer 5 is the unique integer $s$ for which the volume of the unit ball in Euclidean $s-$space is maximal. To me it makes sense to speak of $\mathbb{E}^{5}$ as being maximal with respect to this property. I note that $24=5^2-1$ and assert that 24 is the largest integer in which the following inequality holds: $$ e^{\pi}-\pi+24<-\sum\limits_{s=0}^{\infty}(1-s)\frac{\zeta(s)}{\xi(s)}, $$ See plot at the bottom. Now, I can verify by computer, using wolfram Alpha that, over all $s,$ $$ -\sum\limits_{s=0}^{\infty}(1-s)\frac{\zeta(s)}{\xi(s)}=e^{\pi}-\frac{2}{3}\pi\left[_{2}F_{2}\left(1,1;2,\frac{5}{2},\pi\right)-3_{2}F_{2}\left(1,1;\frac{3}{2},2;\pi\right)\right] $$ Cleverly I was able to show the RHS, and so the left, of the above equation is equal to $$ e^{\pi}(1+erf\sqrt{\pi})-2. $$ This expression is equal to $$43.9993260893828...$$ Subsequently $$ e^{\pi}-\pi<43.9993260893828...-24=19.9993260893829577... $$ In particular $e^{\pi}-\pi$ cannot get any closer to number 20 than 19.999326089... because if it did get any closer it would imply the space $\mathbb{E}^{5}$ does not have the maximal property.

This completes my argument.


Remark: I remind you that $43.9993260893828...$ is the sum of all unit-ball volumes across all dimensions of Euclidean space. I can split it into to sums over even and odd dimensions. In particular it is equal to $$ e^{\pi}+\left(e^{\pi}erf\sqrt{\pi}-2\right), $$ where the parenthetical term are the volumes computed over odd dimensions. We might ask ourselves why is this number so close to 44. Indeed if $$ f(x)=e^{\pi}+\left(e^{\pi}erf\sqrt{x}-2\right), $$ then $$ \lim_{x\to\infty}f(x)=2(e^{\pi}-1)\approx 44 $$ Subsequently at a specific value of $x,$ $f(x)$ will always be less than 44. I figure it might be good to calculate the slope-line, $y$, of the tangent of $f(x)$ when $x=\pi.$ $$ y = 0.318309886183791 x + 42.9993260893829 $$ And so the slope intercepts the y-axis at 42.9993260893829 which is equal to the summated volumes across all dimensions minus 1. It seems a lot hinges on the particularly uninspiring quantity, $erf\sqrt{\pi}$.


enter image description here

| cite | improve this answer | |
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.