TITLE: How to prove that $\frac{\pi}{2}=\left[1, 1, \tfrac{1}{2},\tfrac{1}{3},\tfrac{1}{4},\ldots\right]$?
QUESTION [10 upvotes]: I don't know how to prove the generalized continued fraction
$\pi/2=[1;1/1,1/2,1/3,1/4,...]=1+\cfrac{1}{1/1+\cfrac{1}{1/2+\cfrac{1}{1/3+\cfrac{1}{1/4+\ddots}}}}$
It appears on wikipedia without proof, it contains the terms of the harmonic series but it seems not to be very well known.
I would appreciate any help, thanks.

REPLY [5 votes]: Matrix Representation of Convergents
One method to compute the convervgents of continued fractions uses matrices:
if $[c_0;c_1,c_2,\dots,c_n]=\frac{p_n}{q_n}$, then
$$
\begin{bmatrix}0&1\\1&0\end{bmatrix}
\prod_{k=0}^n\begin{bmatrix}0&1\\1&c_k\end{bmatrix}
=\begin{bmatrix}p_{n-1}&p_n\\q_{n-1}&q_n\end{bmatrix}\tag1
$$
Since $c_0=1$, and for $k\ge1$, $c_k=\frac1k$ we get
$$
\begin{bmatrix}1&1\\0&1\end{bmatrix}
\prod_{k=1}^n\begin{bmatrix}0&1\\1&\frac1k\end{bmatrix}
=\begin{bmatrix}p_{n-1}&p_n\\q_{n-1}&q_n\end{bmatrix}\tag2
$$

Closed Form
We will show by induction that
$$
\begin{bmatrix}1&1\\0&1\end{bmatrix}
\prod_{k=1}^{2n}\begin{bmatrix}0&1\\1&\frac1k\end{bmatrix}
=\begin{bmatrix}
\frac{4^n}{\binom{2n}{n}}&\frac{4^n}{\binom{2n}{n}}\\
\frac{\binom{2n}{n}2n}{4^n}&\frac{\binom{2n}{n}(2n+1)}{4^n}
\end{bmatrix}\tag3
$$
Note that $(3)$ is true for $n=0$. Assume $(3)$ is true for some $n$, then
$$
\begin{bmatrix}
\color{#C00}{\frac{4^n}{\binom{2n}{n}}}&\color{#C00}{\frac{4^n}{\binom{2n}{n}}}\\
\color{#090}{\frac{\binom{2n}{n}2n}{4^n}}&\color{#090}{\frac{\binom{2n}{n}(2n+1)}{4^n}}
\end{bmatrix}
\begin{bmatrix}
0&1\\1&\frac1{2n+1}
\end{bmatrix}
=\begin{bmatrix}
\frac{4^n}{\binom{2n}{n}}&\color{#C00}{\frac{4^{n+1}}{\binom{2n+2}{n+1}}}\\
\frac{\binom{2n}{n}(2n+1)}{4^n}&\color{#090}{\frac{\binom{2n}{n}(2n+1)}{4^n}}
\end{bmatrix}\tag4
$$
The left column of the result is easy, the right column top element is
$$
\begin{align}
\color{#C00}{\frac{4^n}{\binom{2n}{n}}}\cdot1+\color{#C00}{\frac{4^n}{\binom{2n}{n}}}\cdot\frac1{2n+1}
&=\frac{4^n}{\binom{2n}{n}}\frac{2n+2}{2n+1}\tag{5a}\\
&=\frac{4^n}{\binom{2n}{n}}\frac{(2n+2)^2}{(2n+1)(2n+2)}\tag{5b}\\
&=\color{#C00}{\frac{4^{n+1}}{\binom{2n+2}{n+1}}}\tag{5c}
\end{align}
$$
the right column bottom element is
$$
\begin{align}
\color{#090}{\frac{\binom{2n}{n}2n}{4^n}}\cdot1+\color{#090}{\frac{\binom{2n}{n}(2n+1)}{4^n}}\cdot\frac1{2n+1}
&=\color{#090}{\frac{\binom{2n}{n}(2n+1)}{4^n}}\tag6
\end{align}
$$
We can continue
$$
\begin{bmatrix}
\color{#C00}{\frac{4^n}{\binom{2n}{n}}}&\color{#C00}{\frac{4^{n+1}}{\binom{2n+2}{n+1}}}\\
\color{#090}{\frac{\binom{2n}{n}(2n+1)}{4^n}}&\color{#090}{\frac{\binom{2n}{n}(2n+1)}{4^n}}
\end{bmatrix}
\begin{bmatrix}
0&1\\1&\frac1{2n+2}
\end{bmatrix}
=\begin{bmatrix}
\frac{4^{n+1}}{\binom{2n+2}{n+1}}&\color{#C00}{\frac{4^{n+1}}{\binom{2n+2}{n+1}}}\\
\frac{\binom{2n}{n}(2n+1)}{4^n}&\color{#090}{\frac{\binom{2n+2}{n+1}(2n+3)}{4^{n+1}}}
\end{bmatrix}\tag7
$$
The left column of the result is easy, the right column top element is
$$
\begin{align}
\color{#C00}{\frac{4^n}{\binom{2n}{n}}}\cdot1+\color{#C00}{\frac{4^{n+1}}{\binom{2n+2}{n+1}}}\cdot\frac1{2n+2}
&=\frac{4^n}{\binom{2n}{n}}+\frac{4^n}{\binom{2n}{n}}\frac4{\frac{(2n+1)(2n+2)^2}{(n+1)^2}}\tag{8a}\\
&=\frac{4^n}{\binom{2n}{n}}+\frac{4^n}{\binom{2n}{n}}\frac1{2n+1}\tag{8b}\\
&=\frac{4^n}{\binom{2n}{n}}\frac1{\frac{(2n+1)(2n+2)}{(2n+2)^2}}\tag{8c}\\
&=\color{#C00}{\frac{4^{n+1}}{\binom{2n+2}{n+1}}}\tag{8d}
\end{align}
$$
the right column bottom element is
$$
\begin{align}
\color{#090}{\frac{\binom{2n}{n}(2n+1)}{4^n}}\cdot1+\color{#090}{\frac{\binom{2n}{n}(2n+1)}{4^n}}\cdot\frac1{2n+2}
&=\frac{\binom{2n}{n}(2n+1)}{4^n}\frac{(2n+2)(2n+3)}{(2n+2)^2}\tag{9a}\\
&=\color{#090}{\frac{\binom{2n+2}{n+1}(2n+3)}{4^{n+1}}}\tag{9b}
\end{align}
$$
$(4)$ and $(7)$ show that $(3)$ is true for $n+1$.

Estimating the Convergents
$(1)$ and $(3)$ show that
$$
\frac{p_{2n-1}}{q_{2n-1}}=\frac1{2n}\left(\frac{4^n}{\binom{2n}{n}}\right)^2\tag{10}
$$
$$
\frac{p_{2n}}{q_{2n}}=\frac1{2n+1}\left(\frac{4^n}{\binom{2n}{n}}\right)^2\tag{11}
$$
$(10)$ and $(11)$ can be unified as
$$
\frac{p_n}{q_n}=\frac1{n+1}\left(\frac{4^{\lceil n/2\rceil}}{\binom{2\lceil n/2\rceil}{\lceil n/2\rceil}}\right)^2\tag{12}
$$
$(9)$ from this answer says that
$$
\pi\left(n+\tfrac14\right)\le\left(\frac{4^n}{\binom{2n}{n}}\right)^2\le\pi\left(n+\tfrac13\right)\tag{13}
$$
Since $\frac n2\le\lceil n/2\rceil\le\frac{n+1}2$, $(12)$ and $(13)$ show that
$$
\frac\pi2\left(1-\frac1{2n+2}\right)\le\frac{p_n}{q_n}\le\frac\pi2\left(1+\frac2{3n+3}\right)\tag{14}
$$
which, by the Squeeze Theorem, says that
$$
\bbox[5px,border:2px solid #C0A000]{\lim_{n\to\infty}\left[1;1,\tfrac12,\tfrac13,\dots,\tfrac1n\right]=\frac\pi2}\tag{15}
$$


Wallis Product
The Wallis Product for $\pi$ is
$$
\frac\pi2=\prod_{k=1}^\infty\frac{4k^2}{4k^2-1}\tag{16}
$$
Consider the partial products
$$
\begin{align}
\prod_{k=1}^n\frac{4k^2}{4k^2-1}
&=\prod_{k=1}^n\frac{2k}{2k+1}\frac{2k}{2k-1}\tag{17a}\\
&=\prod_{k=1}^n\frac{2k-1}{2k+1}\left(\frac{2k}{2k-1}\right)^2\tag{17b}\\
&=\frac1{2n+1}\left(\prod_{k=1}^n\frac{(2k)^2}{(2k-1)2k}\right)^2\tag{17c}\\
&=\frac1{2n+1}\left(\frac{4^n}{\binom{2n}{n}}\right)^2\tag{17d}
\end{align}
$$
Note the similarity between $(11)$ and $\text{(17d)}$.