59

Benoit Cloitre offered two 'mirror sequences', which allow to compute $\pi$ and $e$ in similar ways:

$$u_{n+2}=u_{n+1}+\frac{u_n}{n}$$

$$v_{n+2}=\frac{v_{n+1}}{n}+v_{n}$$


$$u_1=v_1=0$$

$$u_2=v_2=1$$


$$\lim_{n \to \infty} \frac{n}{u_n}=e$$

$$\lim_{n \to \infty} \frac{2n}{v_n^2}=\pi$$


The formulation and the proof can be seen here.

What do you think - is it just a coincidence or is there some deeper meaning in this mirror algorithm about the connection of two constants?


By @EricStucky in the comment, the better question:

Is there any connection between $e$ and $π$ which is essentially different than Euler's formula?

Of course, I expect an answer related to my own question about this 'mirror sequence'

If, on the other hand, someone shows a clear relation between this sequence and Euler's formula, that's fine too

Yuriy S
  • 30,220
  • 5
  • 48
  • 168
  • Hardly a coincindence since they are related by eulers formula $e{2*i*pi}=1 . This looks like an algorithm equivalent to implementing continued fractions. If so then I would look at a continued fraction of "e^1" for 1; and the same for 2*i*pi. I'm no expert but I think I could manage that line of thought. There's too many steps in the referenced document for my taste of such a simple matter. – rrogers Feb 23 '16 at 23:28
  • This algorithm generates infinite series, not continued fraction – Yuriy S Feb 24 '16 at 19:50
  • 1
    I think the broader question implicit here: is there any connection between $e$ and $\pi$ which is essentially different than Euler's formula? is a rather worthwhile one. – Eric Stucky Mar 11 '16 at 09:23
  • 1
    The continued fraction for $e$ is very simple. I don't know exactly how you'd define a continued fraction for $2i\pi$, what with it not being a real number. The continued fraction for $2\pi$ has no perceptible structure. – Gerry Myerson Mar 11 '16 at 09:41
  • @D.Thomine, there is an infinite amount of integrals having some combination of $\pi$ and $e$ as their value, as well as infinite products and series. There is nothing special about this one – Yuriy S Mar 15 '16 at 09:35
  • I'm especially curious about the sequence provided, not something else unrelated – Yuriy S Mar 15 '16 at 09:39
  • Also, the Ramanujan formula (and most if not all of the other like it) can be proved by using contour integration which is essentially related to Euler's formula. – Yuriy S Mar 15 '16 at 09:48
  • @D.Thomine: See http://math.stackexchange.com/q/833920/72031 for the proof of the formula of Ramanujan in your comment. – Paramanand Singh Mar 15 '16 at 11:13
  • Where can we see the original paper or question of Benoît Cloitre ? Can you give me a reference? Thanks. – Jean Marie Mar 16 '16 at 22:55
  • @JeanMarie, the link provided is the only one I have. – Yuriy S Mar 17 '16 at 05:10
  • This immediately implies $\int_{-\infty}^{\infty}e^{-x^2/2}dx=\sqrt{2\pi}$ and $\frac{\sum_{n=1}^{\infty}6/n^2}{\sum_{n=0}^{\infty}1/n!} = \frac{\pi^2}{e}$. – Michael Mar 18 '16 at 06:59
  • 2
    A big difference between these two constants is that $e$ almost never appears alone, it's usually a special case of the exponential function at 1. If you change the first formula to $u_{n+2} = α u_{n+1} + u_n/n$ and retain the initial conditions, it requires just little extra work to show that $n^α / u_n$ tends to $Γ(α+1) e^α$. The formula is then a special case for $α = 1$. I highly doubt that any analogous generalization could be performed in the other. – The Vee Mar 29 '16 at 18:18
  • @YuriyS Would you be interested in a uniform presentation of the generating functions? Derived in a uniform way using "method of coefficients". But the result of moving the 1/n around is rather dramatic in terms of the differential equation and resulting generating functions. I believe his last derivation is in error; although I have been know to err. – rrogers Jun 10 '16 at 20:06
  • @rrogers, both algorithms are correct, but the one for $\pi$ is very slow. I checked with Mathematica to high precision. As for the generating functions, I would be interested of course, but only if you have the time – Yuriy S Jun 10 '16 at 20:11
  • @TheVee: It should read $u_{n+2}=u_{n+1}+\alpha~u_n/n.$ – Lucian Oct 04 '16 at 16:45
  • @TheVee: I was also wondering to what value the limit of $n^\alpha/w_n^2$ for the modified $\pi$ sequence $w_{n+2}=\alpha~w_{n+1}/n+w_n$ converges. – Lucian Oct 04 '16 at 17:52
  • @Lucian: Thanks for the correction, I can't verify either at the moment. Ad the modified $\pi$ sequence: that's what my last sentence was about, and in a broader sense, the whole comment. Most likely, it converges to nothing interesting, or at least nothing directly expressible with $\pi$. Which is why the two procedures are not as related as they seem. – The Vee Oct 04 '16 at 23:19
  • @TheVee: $\pi$ itself is expressible in terms of the $\Gamma$ and beta functions of specific arguments, and is also connected to the vaster notion of elliptic integrals, just like Euler's constant *e* can also be seen as an individual instance of the more general exponential function. That's why I've asked, since I **do** suspect a possible closed form for the more general $w_n$ sequence in terms of these three aforementioned functions. – Lucian Oct 05 '16 at 18:38
  • 1
    @Lucian I did some more maths and you're right, there's a closed form for $w_n$ and the limit you mention should be $\Gamma(\frac\alpha2 + 1)^2 / 2^{\alpha - 3}$. For $\alpha = 1,2,3,4, \ldots$ this gives $\pi, 2, \frac9{16}\pi, 2, \ldots$. I can post some details if you're interested, but probably not here in the comments. – The Vee Oct 06 '16 at 00:14
  • 1
    Correction: $\Gamma(\frac\alpha2+1)^2/2^{\alpha-2}$. I mistakenly used the denominator $2n^\alpha$ influenced by the original question instead of $n^\alpha$. – The Vee Oct 06 '16 at 01:08
  • @TheVee: This site allows -and even encourages- users to answer their own questions. So -if you're up for it- you can ask a question about the modified $w_n$ sequence and its limit, and later post a reply to it yourself, if no one else does so in the mean time. Also, could it possibly be that the connection between the two similar sequences might be explained by the fact that the $\Gamma$ function is expressed by means of a definite integral containing the exponential function in its integrand ? – Lucian Oct 06 '16 at 01:49
  • @Lucian I'm actually almost done writing an answer here as I think I can now answer the original question as posed. – The Vee Oct 06 '16 at 02:18
  • Thank you so much @Lucian! It's the first bounty I've ever received :-) – The Vee Oct 30 '16 at 10:43
  • @TheVee: Keep up the good work ! – Lucian Oct 30 '16 at 16:38

2 Answers2

21

Both the limits can be evaluated in a more general scenario where you put constants $a$ and $b$ in front of the two terms on the right-hand side. The recurrence equations can be solved analytically and the corresponding limits taken in the case $a=1 \wedge b=1$. They both involve the gamma function and some powers. The difference between the two "algorithms" is then that in the first, the gamma function is trivial while the power $e^1$ remains, while in the second, the power term calcels out with the factor $2$ but the gamma function brings in $\pi$ (as it often does). So the answer is no, these two sequences don't disclose any commonalities between the two constants. They just evaluate to expressions which somehow contain both, and in either, one of the terms becomes trivial, leaving only the other.

Details

Let's solve the two systems in parallel (NB. the equations below come in pairs to show the correspondence, they are not systems.) Using the method of generating functions, we convert the equations $$\begin{aligned} u_{n+2} &= a u_{n+1} + b\frac{u_n}n, \\ v_{n+2} &= a \frac{v_{n+1}}n + b v_n \end{aligned}$$ with initial conditions $u_1 = v_1 = 0$, $u_2 = v_2 = 1$, to ordinary differential equations $$\begin{aligned} \frac{f'(x)}x - \frac{2f(x)}{x^2} &= a\left(f'(x) - \frac{f(x)}x\right) + b f(x), \\ \frac{g'(x)}x - \frac{2g(x)}{x^2} &= a \frac{g(x)}x + b x g'(x) \end{aligned}$$ where $$\begin{aligned} f(x) &= \sum_{n=2}^{+\infty} u_n x^n, \\ g(x) &= \sum_{n=2}^{+\infty} v_n x^n. \end{aligned}$$ The solutions for $a>0, b>0$ with a unit quadratic term (the initial condition) are $$\begin{aligned} f(x) &= x^2 e^{-\frac{bx}a} (1 - a x)^{-1-\frac b{a^2}}, \\ g(x) &= x^2 (1 - \sqrt b x)^{-1 - \frac a{2\sqrt b}} (1 + \sqrt b x)^{-1 + \frac a{2\sqrt b}}. \end{aligned}$$ We can extract the coefficients by writing down and expanding the Taylor series: $$\begin{aligned} f(x) &= x^2 \sum_{k=0}^{+\infty} \frac1{k!} \left(\frac{-bx}a\right)^k \sum_{l=0}^{+\infty} \frac{(1+b/a^2)_l}{l!} (ax)^l \\ &\quad = \sum_{n=0}^{+\infty} \left[ \sum_{k=0}^n \frac{(-1)^k}{k!(n-k)!} \left(\frac ba\right)^k (1+b/a^2)_{n-k} a^{n-k} \right] x^{n+2}, \\ % g(x) &= x^2 \sum_{k=0}^{+\infty} \frac{\big(1 + a/(2\sqrt b)\big)_k}{k!} (\sqrt b x)^k \sum_{l=0}^{+\infty} \frac{\big(1 - a/(2\sqrt b)\big)_l}{l!} (-\sqrt b x)^l \\ &\quad = \sum_{n=0}^{+\infty} \left[ \sum_{l=0}^n \frac{(-1)^l}{l!(n-l)!} \big(1 - a/(2\sqrt b)\big)_l \big(1 + a/(2\sqrt b)\big)_{n-l} (\sqrt b)^n \right] x^{n+2}. \end{aligned}$$ The two expansions have some similarities and both allow us to write down and simplify (converting the Pochhammer symbols with negative $k$ to positive $k$ followed by using a straightforward application of the definitions, all doable in hand) the $(n+2)$-th coefficient: $$\begin{aligned} u_{n+2} &= \binom{n+p}{p} a^n {}_1F_1(-n; -n-p; -p), \\ v_{n+2} &= \binom{n+q}{q} \sqrt b^n {}_2F_1(-n, 1-q; -q-n; -1), \end{aligned}$$ where $p$ and $q$ are shorthand notation for the recurring subexpressions in either formula, $$\begin{aligned} p &= b / a^2,\\ q &= a / (2 \sqrt b). \end{aligned}$$ Now the similarity is quite striking (keeping in mind, however, that there's a world of difference between $_1F_1$ and $_2F_1$, and between evaluation something in $-1$ and in a generic point), but that's still not too surprising given how simple the original recurrent equations were.

We can find asymptotic forms of $u_n$ and $v_n$ from here. For that, it's advantageous to rewrite the hypergeometrics so that the dependence on $n$ appears only in the denominator terms. Here are two handy identities just for us: for the $_1F_1$ and for the $_2F_1$. This brings $u_{n+2}$ and $v_{n+2}$ to their equivalent forms $$\begin{aligned} u_{n+2} &= \binom{n+p}{p} a^n e^{-p} {}_1F_1(-p; -n-p; p), \\ v_{n+2} &= \binom{n+q}{q} \sqrt b^n 2^{q-1} {}_2F_1(-q, 1-q; -q-n; 1/2), \end{aligned}$$ Now as $n \to +\infty$, we are guaranteed that the $_pF_q$ terms approach $1$, so we can just trim them to the zeroth term each. For the generalized binomial coefficients, we use Stirling's formula for the "big" factorials, leaving $$\binom{n+\Delta}{\Delta} \approx \frac{n^\Delta}{\Delta!}.$$ This gives us the asymptotics $$\begin{aligned} u_{n+2} &\approx \frac{a^n n^p e^{-p}}{p!}, \\ v_{n+2} &\approx \frac{\sqrt b^n n^q 2^{q-1}}{q!}. \end{aligned}$$ As mentioned in the introduction, each of these terms has a geometric term and a gamma function (the factorial). They also have one exponential term each, which goes away for $a=1$ and for $b=1$, respectively:

For $a=1$, $p=b$ and the asymptotic behaviour of $u_{n+2}$ is $$u_{n+2} \approx n^b e^{-b} / b!$$ and when compensated in a limit procedure, this tends to $$\large \lim_{n \to +\infty} \frac{n^b}{u_n} = e^b b! = \Gamma(b+1) e^b.$$ In particular, $b=1$ gives the limit $e^1 1! = e$. For half-integer values of $b$, both $e$ (in some power) and $\pi$ (in a square root) will be present simultaneously.

For $b=1$, $q=a/2$ and the asymptotic behaviour of $v_{n+2}$ is $$v_{n+2} \approx n^{a/2} 2^{a/2 - 1} / (a/2)!$$ and when squared and compared to $n^a$, this gives the limit $$\large \lim_{n \to +\infty} \frac{n^a}{v_n^2} = \frac{(a/2)!^2}{2^{a-2}} = \frac{\Gamma(1+\frac a2)^2}{2^{a-2}}.$$ In particular, $a=1$ produces $\Gamma(3/2)^2 / 2^{-1}$. Since $\Gamma(3/2) = (1/2)! = \sqrt\pi/2$, this is one half of $\pi$. The residual power of $2$ is cancelled when the limit expression is ${\bf 2}n / v_n^2$. For a generic odd $a$, there would be some multiple of $\pi$ and some power of $2$.

Conclusion

Albeit the two equations can be solved using quite similar methods and even their full solutions share a lot of common features, the results $e$ and $\pi$ come ultimately from different and unrelated parts of the formulas. The former comes from a power term when all the other terms become trivial. The latter comes from a special value of a gamma function when the other terms are reduced to a constant of $2$. The base $e$ is connected to the properties of the Kummer function $_1F_1$ whereas the base $2$ appears in a similar function for the Gauss function $_2F_1$.

The Vee
  • 2,961
  • 14
  • 33
  • If the $\approx$ notation seems too vague, add a $\times\big(1+O(1/\sqrt n)\big)$ everywhere it appears. – The Vee Oct 06 '16 at 10:36
  • Great answer! I didn't think it was possible to really answer the question as completely as you did. – Yuriy S Oct 30 '16 at 11:08
2

As always, with me, please double check. The sequence is quite obvious.
We will transform both to differential equations by the "Method of Coefficients". This is similar to one of Benoit Cloitre's methods but a little more direct.
Using the two OGF forms: $$V\left(x\right)={\displaystyle \sum_{k=0}^{\infty}} v_{k}x^{k}, U\left(x\right)={\displaystyle \sum_{k=0}^{\infty}}u_{k}x^{k}$$ The alignment/conversion techniques are:
$$\left[x^{k}\right]\frac{V\left(x\right)}{x^{2}}=v_{k+2};\left[x^{k}\right]\frac{V\left(x\right)}{x}=v_{k+1};\left[x^{k}\right]x\cdot\frac{\partial V(x)}{\partial x}=n\cdot v_{k}$$ We line up the $[x^{k}]$ terms for $V_{k}\left(x\right),U_{k}\left(x\right)$ and flatten the recursions: $$n\cdot v_{n+2}-v_{n+1}-n\cdot v_{n}=0$$ $$n\cdot u_{n+2}-n\cdot u_{n+1}-u_{n}=0$$ $x\cdot\frac{\partial\left(\frac{U\left(x\right)}{x^{2}}\right)}{\partial x}-x\cdot\frac{\partial\left(\frac{U(x)}{x}\right)}{\partial x}-U\left(x\right)=0$

$x\cdot\frac{\partial\left(\frac{U\left(x\right)}{x^{2}}\right)}{\partial x}-x\cdot\frac{\partial\left(\frac{U(x)}{x}\right)}{\partial x}-U\left(x\right)=0$

$\left(\frac{1}{x}-1\right)\frac{\partial U\left(x\right)}{\partial x}-\left(\frac{2}{x^{2}}-\frac{1}{x}+1\right)U(x)=0$

$x\cdot\left(1-x\right)\frac{\partial U\left(x\right)}{\partial x}-\left(2-x+x^{2}\right)U(x)=0$

$\frac{1}{U\left(x\right)}\frac{\partial U\left(x\right)}{\partial x}-\left(\frac{\left(x^{2}-x+2\right)}{x\cdot\left(1-x\right)}\right)=0$

$U\left(x\right)=\frac{e^{-x}\cdot x^{2}}{\left(1-x\right)^{2}}$

Where the integration constant is evaluated by the first three terms of the taylor series expansion.

$x\cdot\frac{\partial\left(\frac{V\left(x\right)}{x^{2}}\right)}{\partial x}-\frac{V\left(x\right)}{x}-x\cdot\frac{\partial V\left(x\right)}{\partial x}=0$

$x\cdot\frac{-2}{x^{3}}V\left(x\right)+x\cdot\frac{1}{x^{2}}\frac{\partial V\left(x\right)}{\partial x}-\frac{V\left(x\right)}{x}-x\cdot\frac{\partial V\left(x\right)}{\partial x}=0$

$\left(\frac{1}{x}-x\right)\frac{\partial V\left(x\right)}{\partial x}-\left(\frac{1}{x}+\frac{2}{x^{2}}\right)V\left(x\right)=0$

$\left(1-x^{2}\right)\cdot x\cdot\frac{\partial V\left(x\right)}{\partial x}-\left(x+2\right)\cdot V\left(x\right)=0$

$\frac{1}{V\left(x\right)}\frac{\partial V\left(x\right)}{\partial x}-\left(\frac{2}{x}-\frac{1}{2\cdot\left(x+1\right)}-\frac{3}{2\cdot\left(x-1\right)}\right)=0$

$ln\left(V\left(x\right)\right)=ln\left(x^{2}\right)-ln\left(\left(x+1\right)^{\frac{1}{2}}\right)-ln\left(\left(\left(x-1\right)^{\frac{3}{2}}\right)\right)+C$

$V\left(x\right)=\frac{x^{2}}{\left(x-1\right)^{\frac{1}{2}}\cdot\left(x+1\right)^{\frac{3}{2}}}$

rrogers
  • 881
  • 5
  • 20
  • It is possible to convert the coefficients of these particular forms to expressions in combinatorial forms by a fairly elementary techniques; if anybody is interested. The technique is straightforward but tends to drag on a bit. – rrogers Jun 10 '16 at 21:35
  • 1
    This is a very nice method, I'm not familiar with it. Can we do it for any iterative sequence? – Yuriy S Jun 10 '16 at 21:36
  • Sure just follow those conversion rules to line up coefficients of x^k on the seperate terms. Of course the rules only address polynomials in "k" as coefficients; and the underlying recursion has to be linear in the unknowns; i.e. no $(v_{k})^{2}$ type of terms. – rrogers Jun 10 '16 at 21:39
  • 2
    Of course if I follow current culture I would copyright it and sue. Or perhaps I should declare it "public domain"? Such silliness. – rrogers Jun 10 '16 at 21:44