# Approximation of $e$ using $\pi$ and $\phi$?

$$e \approx \frac{4 \phi +3 \pi-5}{4}$$

where $~\phi~$ is a Golden ratio .

Is it possible to construct better approximation of $e$ using $\pi$ , $\phi$ and integers ?

• It is possible, if unlikely, that $e+\pi$ is rational, in which case we would have an excellent (exact) "approximation" $e=p/q-\pi$ with $p,q\in \mathbf N$. :) – tomasz Aug 7 '12 at 0:41
• Just for illustration, these connect $e,\,\pi,\,\phi$: \begin{aligned}e^{\pi\sqrt{5}} &\approx 2^6\phi^6-24.2\dots\\ e^{\pi\sqrt{10}} &\approx 2^6\phi^{12}+24.98\dots\\ e^{\pi\sqrt{15}} &\approx 2^{12}\phi^8-24.001\dots\\ e^{\pi\sqrt{25}} &\approx 2^6\phi^{24}-24.00004\dots \end{aligned} The fact that the "excess" involve $24$ is not coincidence, as these were found using the Dedekind eta function (which contains a $24$th root). – Tito Piezas III Jan 7 '15 at 20:31

Yes : $$e \approx \pi+\phi +\frac{1-\pi\cdot\phi}2 \approx 2.718$$ $$e \approx \frac{-\phi+2\pi-1+2\pi^2}3-\pi\cdot\phi \approx 2.71825$$ $$e \approx \frac{6\phi-2\pi+2\pi\cdot\phi}5 \approx 2.71828$$

Should you accept only linear expressions : $$e \approx \frac{46\phi+173\pi-183}{160} \approx 2.718281828459$$ $$e \approx \frac{45483\phi-2961\pi-18765}{16748} \approx 2.718281828459045235360$$ In fact we may find approximations as precise as you want. But note that their expression is as long as the decimal expansion obtained!

(Answering Peter) Of course it is more funny to find such relations yourself so let's use the free and excellent pari/gp software (the .exe should be fine for Windows (*)) to get some other relations using the $\textrm{lindep}$ function. This function implements the PSLQ and LLL algorithm (the integer relation algorithms suggested by lhf) that is for a given vector $[x_1,x_2,\cdots,x_n],\ x_i \in \mathbb{R}$ it returns a vector $[a_1,a_2,\cdots,a_n],\ a_i\in \mathbb{Z}$ such that $\sum_{i=1}^n a_i\cdot x_i \approx 0$ (in fact to a given precision : 22 digits in our first example) :

\p 100 (100 digits precision should be enough)
phi=(sqrt(5)+1)/2
lindep([exp(1),phi,Pi,1],22)

returns $[-16748, 45483, -2961, -18765]~$ (with $\sum_{i=1}^n a_i\cdot x_i \approx 10^{-17}$)

%/16748

returns $[-1, 45483/16748, -2961/16748, -18765/16748]$ that is : $$e \approx \frac{45483\phi-2961\pi-18765}{16748} \approx 2.718281828459045235360$$

These algorithms are also implemented in Mathematica, Maple and others but let's continue with pari/gp and search this time a multiplicative answer (to a precision of 5 digits) :

lindep([1,log(phi),log(Pi)],5) (note that $1=\log(\exp(1))$)

returns [-7, -14, 12]~ or (divided by 7)
[-1, -2, 12/7]~

so that $-1 -2\log(\phi)+\frac{12}7\log(\pi) \approx 0$
or $1 \approx -2\log(\phi)+\frac{12}7\log(\pi)$
and the exponential of this becomes : $$e\approx \frac{\pi^{\frac{12}7}}{\phi^2}\approx 2.7182$$

You may even find expressions like these proposed by Robert Israel using :

lindep([1,phi,Pi,Pi^2,Pi^3,-exp(1),-exp(1)*phi,-exp(1)*Pi,-exp(1)*Pi^2,-exp(1)*Pi^3],{precision})

These very powerful methods have many applications in diophantine equations and cryptography and for discovering exact relations using 'experimental mathematics'!

But it's time to let you play with that too so : have fun!!

(*) On Windows you may encounter the typical problems with console applications (unnatural rectangular copy/paste and windows resize). To avoid frustrations with gp I would recommend to use Console2 and launch gp using a syntax like :
C:\tools\Console2\Console.exe -r "/k C:\tools\pari\gp.exe"
(supposing that Console2 and pari are in C:\tools).
If you want to use Ctrl-C and Ctrl-V as usual you'll have to change the default settings (right click/Edit/Settings/Hotkeys). A text may be selected with 'shift' down before mouse-drag.
Hoping all this will help you to appreciate this excellent tool (great for number theory but not only!). There is even a version of pari for android paridroid but I didn't try it...

• What might be fun to do is to construct a telescoping infinite product using the linear expressions in the second part of your answer. – graveolensa Feb 12 '12 at 15:24
• @deoxygerbe: Hi! Could you elaborate on this? – Raymond Manzoni Feb 12 '12 at 15:37
• Sure. If you can generate a sequence of expressions of the form $v_{n}=\frac{a_{n}\phi-b_{n}\pi-c_{n}}{u_{n}}$, then the infinite product $\prod_{n=1}^{\infty} \frac{v_{n+1}}{v_{n}}=e$. – graveolensa Feb 12 '12 at 15:39
• @deoxygerbe: I see. I fear that the difficult part will be to find a general expression for your $(a_n,b_n,c_n,u_n)\$ (the link between $\pi\$, $\phi\$ and $e\$ doesn't appear 'natural' enough for that...). But I don't want to temper your enthusiasm! :-) – Raymond Manzoni Feb 12 '12 at 15:54
• It may not necessarily be something that we can explicitly write down. Do you mind using the methods you used to generate those two to make, say, maybe 10 to 20 more terms? – graveolensa Feb 12 '12 at 15:58

Of course. $\phi \approx 1.618033989$ and $e \approx 2.718281828$ so $\displaystyle e \approx \frac{2718281828}{1618033989} \phi .$ Extend to whatever accuracy you desire.

Edit in response to comment: If you require using $\pi$ as well, then we can do $$\displaystyle e \approx \frac{2718281828}{2\cdot 1618033989} \phi + \frac{2718281828}{2\cdot 3141692654} \pi.$$

• where is $\pi$ in your equation? – Peđa Terzić Feb 12 '12 at 14:17
• @pedja I didn't realize using $\pi$ was required, but I've edited my post to include it. – Ragib Zaman Feb 12 '12 at 14:21
• A more interesting question would result, if we define "better" in terms of the approximation error multiplied by the maximum absolute value of the integer coefficients used. – Jyrki Lahtonen Feb 12 '12 at 14:34
• @Jyrki's comment makes me think of a three-dimensional extension of continued fractions, where at each level instead of $n+\frac1\ldots$ you could also have $n\phi+\frac\pi\ldots$ or $n\phi+\frac\phi\ldots$... – Rahul Feb 12 '12 at 15:27

Try: $${\frac {16+31\,\phi+6\,\pi +25\,{\pi }^{2}-14\,{\pi }^{3}}{11+25\,\phi +4\,\pi -48\,{\pi }^{2}+12\,{\pi }^{3}}}$$

• Is that in any way related to a Padé aproximant? – Pedro Tamaroff Feb 12 '12 at 18:50
• No, it isn't. What I did was use Maple's LinearDependency function on $[1, \phi, \pi, \pi^2, \pi^3, e, e \phi, e \pi, e \pi^2, e \pi^3]$. – Robert Israel Feb 13 '12 at 1:23
• Is there any way this results could be obtained without a computer? – Pedro Tamaroff Feb 13 '12 at 1:27

You can approximate any number using only $\phi$ by expressing it in the Golden ratio base.

For example, $e \approx \phi^2 + \phi^{-5} + \phi^{-10} + \phi^{-13} = 100.0000100001001_\phi = 2.71825392998$

Since $\phi$ is algebraic, and $e$ is transcendent, it follows that $\frac{e}{\phi}$ is irrational.

Then, the set $\{ m\frac{\pi}{\phi} +n | m,n \in Z \}$ is dense in $R$ and thus is also

$$\{ m \pi +n\phi | m,n \in Z \}$$

Thus, for each $\epsilon >0$ there exists infinitely many pairs $(m,n)$ of integers so that

$$e \approx m \pi +n\phi \,,$$

with the error of the approximation less than $\epsilon$...

Here's a generalization of continued fractions that Jyrki's comment inspired.

$$\begin{array}{rlcrlcrlcrlcrlll} e = &\!\!\!\! 2 &\!\!\!\! + &\!\!\!\! 1/(&\!\!\!\! 1 &\!\!\!\! + &\!\!\!\! 1/(&\!\!\!\! 2 &\!\!\!\! + &\!\!\!\! 1/(&\!\!\!\!1 &\!\!\!\! + &\!\!\!\! \ldots&\!\!\!\! ) \\ &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! \text{or } &\!\!\!\! 0 &\!\!\!\! + &\!\!\!\! \pi^2/(&\!\!\!\!3 &\!\!\!\! + &\!\!\!\! \ldots&\!\!\!\! ) \\ &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! \text{or } &\!\!\!\! \phi &\!\!\!\! + &\!\!\!\! \phi^2/(&\!\!\!\!2 &\!\!\!\! + &\!\!\!\! \ldots&\!\!\!\! )&\!\!\!\! ) \\ &\!\!\!\! &\!\!\!\! &\!\!\!\! \text{or } &\!\!\!\! 0 &\!\!\!\! + &\!\!\!\! \pi^2/(&\!\!\!\! 7 &\!\!\!\! + &\!\!\!\! 1/(&\!\!\!\!11 &\!\!\!\! + &\!\!\!\! \ldots&\!\!\!\! ) \\ &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! \text{or } &\!\!\!\! 2\pi &\!\!\!\! + &\!\!\!\! \pi^2/(&\!\!\!\!12 &\!\!\!\! + &\!\!\!\! \ldots&\!\!\!\! ) \\ &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! \text{or } &\!\!\!\! 4\phi &\!\!\!\! + &\!\!\!\! \phi^2/(&\!\!\!\!4 &\!\!\!\! + &\!\!\!\! \ldots&\!\!\!\! )&\!\!\!\! ) \\ &\!\!\!\! &\!\!\!\! &\!\!\!\! \text{or } &\!\!\!\! 0 &\!\!\!\! + &\!\!\!\! \phi^2/(&\!\!\!\! 1 &\!\!\!\! + &\!\!\!\! 1/(&\!\!\!\!1 &\!\!\!\! + &\!\!\!\! \ldots&\!\!\!\! ) \\ &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! \text{or } &\!\!\!\! 0 &\!\!\!\! + &\!\!\!\! \pi^2/(&\!\!\!\!5 &\!\!\!\! + &\!\!\!\! \ldots&\!\!\!\! ) \\ &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! \text{or } &\!\!\!\! \phi &\!\!\!\! + &\!\!\!\! \phi^2/(&\!\!\!\!9 &\!\!\!\! + &\!\!\!\! \ldots&\!\!\!\! )&\!\!\!\! )&\!\!\!\! ) \\ \text{or } &\!\!\!\! 0 &\!\!\!\! + &\!\!\!\! \pi^2/(&\!\!\!\! 3 &\!\!\!\! + &\!\!\!\! 1/(&\!\!\!\! 1 &\!\!\!\! + &\!\!\!\! 1/(&\!\!\!\!1 &\!\!\!\! + &\!\!\!\! \ldots&\!\!\!\! ) \\ &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! \text{or } &\!\!\!\! 0 &\!\!\!\! + &\!\!\!\! \pi^2/(&\!\!\!\!6 &\!\!\!\! + &\!\!\!\! \ldots&\!\!\!\! ) \\ &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! \text{or } &\!\!\!\! 0 &\!\!\!\! + &\!\!\!\! \phi^2/(&\!\!\!\!1 &\!\!\!\! + &\!\!\!\! \ldots&\!\!\!\! )&\!\!\!\! ) \\ &\!\!\!\! &\!\!\!\! &\!\!\!\! \text{or } &\!\!\!\! \pi &\!\!\!\! + &\!\!\!\! \pi^2/(&\!\!\!\! 20 &\!\!\!\! + &\!\!\!\! 1/(&\!\!\!\!5 &\!\!\!\! + &\!\!\!\! \ldots&\!\!\!\! ) \\ &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! \text{or } &\!\!\!\! 6\pi &\!\!\!\! + &\!\!\!\! \pi^2/(&\!\!\!\!7 &\!\!\!\! + &\!\!\!\! \ldots&\!\!\!\! ) \\ &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! \text{or } &\!\!\!\! 12\phi &\!\!\!\! + &\!\!\!\! \phi^2/(&\!\!\!\!3 &\!\!\!\! + &\!\!\!\! \ldots&\!\!\!\! )&\!\!\!\! ) \\ &\!\!\!\! &\!\!\!\! &\!\!\!\! \text{or } &\!\!\!\! 2\phi &\!\!\!\! + &\!\!\!\! \phi^2/(&\!\!\!\! 6 &\!\!\!\! + &\!\!\!\! 1/(&\!\!\!\!1 &\!\!\!\! + &\!\!\!\! \ldots&\!\!\!\! ) \\ &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! \text{or } &\!\!\!\! 2\pi &\!\!\!\! + &\!\!\!\! \pi^2/(&\!\!\!\!28 &\!\!\!\! + &\!\!\!\! \ldots&\!\!\!\! ) \\ &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! \text{or } &\!\!\!\! 4\phi &\!\!\!\! + &\!\!\!\! \phi^2/(&\!\!\!\!16 &\!\!\!\! + &\!\!\!\! \ldots&\!\!\!\! )&\!\!\!\! )&\!\!\!\! ) \\ \text{or } &\!\!\!\! \phi &\!\!\!\! + &\!\!\!\! \phi^2/(&\!\!\!\! 2 &\!\!\!\! + &\!\!\!\! 1/(&\!\!\!\! 2 &\!\!\!\! + &\!\!\!\! 1/(&\!\!\!\!1 &\!\!\!\! + &\!\!\!\! \ldots&\!\!\!\! ) \\ &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! \text{or } &\!\!\!\! 0 &\!\!\!\! + &\!\!\!\! \pi^2/(&\!\!\!\!3 &\!\!\!\! + &\!\!\!\! \ldots&\!\!\!\! ) \\ &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! \text{or } &\!\!\!\! \phi &\!\!\!\! + &\!\!\!\! \phi^2/(&\!\!\!\!2 &\!\!\!\! + &\!\!\!\! \ldots&\!\!\!\! )&\!\!\!\! ) \\ &\!\!\!\! &\!\!\!\! &\!\!\!\! \text{or } &\!\!\!\! 0 &\!\!\!\! + &\!\!\!\! \pi^2/(&\!\!\!\! 4 &\!\!\!\! + &\!\!\!\! 1/(&\!\!\!\!6 &\!\!\!\! + &\!\!\!\! \ldots&\!\!\!\! ) \\ &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! \text{or } &\!\!\!\! \pi &\!\!\!\! + &\!\!\!\! \pi^2/(&\!\!\!\!9 &\!\!\!\! + &\!\!\!\! \ldots&\!\!\!\! ) \\ &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! \text{or } &\!\!\!\! 2\phi &\!\!\!\! + &\!\!\!\! \phi^2/(&\!\!\!\!2 &\!\!\!\! + &\!\!\!\! \ldots&\!\!\!\! )&\!\!\!\! ) \\ &\!\!\!\! &\!\!\!\! &\!\!\!\! \text{or } &\!\!\!\! \phi &\!\!\!\! + &\!\!\!\! \phi^2/(&\!\!\!\! 3 &\!\!\!\! + &\!\!\!\! 1/(&\!\!\!\!2 &\!\!\!\! + &\!\!\!\! \ldots&\!\!\!\! ) \\ &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! \text{or } &\!\!\!\! \pi &\!\!\!\! + &\!\!\!\! \pi^2/(&\!\!\!\!33 &\!\!\!\! + &\!\!\!\! \ldots&\!\!\!\! ) \\ &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! &\!\!\!\! \text{or } &\!\!\!\! 2\phi &\!\!\!\! + &\!\!\!\! \phi^2/(&\!\!\!\!12 &\!\!\!\! + &\!\!\!\! \ldots&\!\!\!\! )&\!\!\!\! )&\!\!\!\! ) \end{array}$$

Apparently, $0+\cfrac{\pi^2}{2\phi+\cfrac{\phi^2}{2\pi}} = \dfrac{2\pi^3}{4\pi\phi+\phi^2} \approx 2.702$ and $\phi+\dfrac{\phi^2}{\phi+\dfrac{\phi^2}{\pi}} = \dfrac{2\pi\phi+\phi^2}{\pi+\phi} \approx 2.686$ are good approximations. At least, relative to the coefficients of $\pi$ and $\phi$, if not their powers. I guess this shows that you're better off only using integers in continued fractions...

(Also, I spent entirely too much time typesetting this.)

Update: Expanding the tree two more levels, I found a couple of rather good approximations, $$\phi + \cfrac{\phi^2}{\phi + \cfrac{\phi^2}{2\phi + \cfrac{\phi^2}{8\phi}}} = \dfrac{42\phi}{25} \approx 2.718297$$ and $$0 + \cfrac{\pi^2}{2\phi + \cfrac{\phi^2}{2\pi + \cfrac{\pi^2}{9\pi}}} = \dfrac{19\pi^2}{9\phi^2 + 38\pi\phi} \approx 2.718292,$$ and a couple of not-so-good ones, $$2 + \cfrac{1}{1 + \cfrac{1}{2 + \cfrac{1}{\phi + \cfrac{\phi^2}{13}}}} = \dfrac{8\phi^2 + 104\phi + 39}{3\phi^2 + 39\phi + 13} \approx 2.718280$$ and $$0 + \cfrac{\pi^2}{3 + \cfrac{1}{0 + \cfrac{\pi^2}{\pi + \cfrac{\pi^2}{\pi}}}} = \dfrac{\pi^3}{2 + 3\pi} \approx 2.713950.$$ Interestingly, the approximation accuracy differs greatly between different branches of the tree at similar depths. I'm curious whether there is a natural way to arrange such representations in increasing order of accuracy vs. complexity.

Try an integer relation algorithm, such as PSLQ, but you'll probably need high-precision approximations of $e$, $\pi$, and $\phi$.

We know that $\phi^2 = \phi + 1$ , from where we deduce that $\frac1\phi + \frac1{\phi\ +\ 1} = \frac1\phi + \frac1{\phi^2} = 1$ .

At the same time, we also know that $e = 2.718^{^+}$ , and $\phi = 1.618^{^+}$ , from where we deduce that $e \simeq \phi + 1.1 = \phi^2 + \frac1{10}$ .

Putting the two together, we get the following approximations:

$$\frac1e + \frac1\phi + \frac1{71} \simeq 1 \qquad,\qquad \frac1e + \frac1{\sqrt{e}} + \frac1{39} \simeq 1$$

$$\frac1{\sqrt{e}} + \frac1{\phi^2} + \frac1{87}\ =\ \frac1{\sqrt{e}} + \frac1{\phi + 1} + \frac1{87} \simeq 1$$

I would also like to recommend the following resources : I hope you'll find them helpful.

www.mrob.com/pub/ries/

en.wikipedia.org/wiki/Almost_integer

en.wikipedia.org/wiki/Mathematical_coincidence

I also once played with these famous constants- I came across to this following relation :

$e+\pi \cong 3\phi+1$

Approximation error:$|3\phi-(e+\pi-1)|\approx0,00577 < \frac{3}{500}$

Here we go: $e\approx 3\phi+1-\pi$