# “Harmonacci” recurrence and identities for $\pi$

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?

-
+1 for "Harmonacci" – Dirk Jan 18 '13 at 8:08
So, in terms of continued fractions, we have $a_{n+1}=[a_{n-1}; a_{n-2},\dots, a_2, a_1, a_0, a_1]$. – Nikita Sidorov Jan 18 '13 at 8:59
For $a_0=2n+1$, the numerator of the limit $l_{2n+1}$ seems to be $(1\times 3\times...(2n+1))^2\pi$ and its denominator $2^{2n}\times D(l_{2n-1})$, where $D(l_{2n-1})$ is the denominator of $l_{2n-1}$. And it seems that $l_{2n}=2^{2n}/l_{2n-1}$. Maybe a proof by reccurence could be achieved. – Sylvain JULIEN Jan 18 '13 at 10:05
A cute reformulation: start with a unit square, put another next to it on the left, then a 2 x 1/2 along the top and continue always adding a unit area rectangle alternating top and left. What is the limiting ratio of length to height? – Aaron Meyerowitz Jan 18 '13 at 13:11
Aaron - Cute indeed. – Victor P Jan 20 '13 at 6:24

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.
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "http://mathoverflow.net/questions/119241/harmonacci-recurrence-and-identities-for-pi?answertab=votes", "fetch_time": 1462090623000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2016-18/segments/1461860114649.41/warc/CC-MAIN-20160428161514-00105-ip-10-239-7-51.ec2.internal.warc.gz", "warc_record_offset": 183735137, "warc_record_length": 14743, "token_count": 815, "char_count": 2342, "score": 3.90625, "int_score": 4, "crawl": "CC-MAIN-2016-18", "snapshot_type": "latest", "language": "en", "language_score": 0.8740822672843933, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00025-of-00064.parquet"}