TITLE: "Harmonacci" recurrence and identities for $\pi$
QUESTION [25 upvotes]: While playing with something totally irrelevant I stumbled upon the recurrence:
$$a_{n+1} = \frac{1}{a_n} + a_{n-1}$$
It turns out that given $a_0 = 1, a_1 = 1$,
$$lim \frac{a_{2n}}{a_{2n-1}} = \frac{\pi}{2}$$
I have a very crude idea (or rather a hint) on proving it (the iterations sort of unfold into a sort of Viete product, which is sort of expected), but my technique is rusty at best.
With different initial conditions, things start getting really scary, for example
$ a_0 = 2, 3, 4, 5 $ yield $\frac{8}{\pi}, \frac{9\pi}{8}, \frac{128}{9\pi}, \frac{225\pi}{128}$ respectively.
So, the questions are:
Is it a known fact? If so, where can I read more on it? If not, may anybody help me to prove/disprove it? Does it mean anything?

REPLY [23 votes]: The sequence $a_n$ is closely related to the Wallis product
$$a'_n = \prod_{i = 1}^n \left(\frac{2i}{2i - 1} \frac{2i}{2i + 1}\right),$$
which converges to $\pi/2$ as $n$ goes to infinity. Namely, we have
$$a'_n = a_{n + 1} \cdot \frac{2n}{2n + 1}$$.
This could be proven by induction or maybe more easily by defining $b_n = a_n a_{n - 1}$ and noticing that the recursion for $a_n$ implies the (very simple) recursion
$$b_{n + 1} = 1 + b_n$$
for $b_n$ and expressing $a_n$ in terms of the $b_n$.
For more general values of $a_0$ one gets similar formulas for $a_n$ as (up to a factor converging to 1) a Wallis product or inverse of a Wallis product where a few of the lower terms in the product are missing.