连分数递归公式:设
\begin{align*} \frac{p_n}{q_n}=[a_0,a_1,\cdots,a_n]=a_0+\dfrac{1}{a_{1}+\dfrac{1}{a_2+\dfrac{1}{\ddots +\dfrac{1}{a_n}}}}\end{align*}其中$a_0,a_1,a_2,\cdots$视为变量而不是特定的值,则分子$p_0,p_1,p_2,\cdots$由递归公式
\begin{equation} p_0=a_0,p_1=a_1a_0+1,p_n=a_np_{n-1}+p_{n-2}(n\geq 2)\end{equation}给出,而分母$q_0,q_1,q_2,\cdots$由递归公式\begin{equation} q_0=1,q_1=a_{1},q_n=a_nq_{n-1}+q_{n-2}(n\geq 2)\end{equation}给出.
证明:使用数学归纳法.当$n=0$时,$\frac{p_0}{q_0}=a_0$.此时,可以令$p_0=a_0,q_0=1$.设当$n=k$时,递推式成立,则即此时可以令
\begin{equation}\label{eq:1111111111} p_k=a_kp_{k-1}+p_{k-2}\end{equation}\begin{equation}\label{eq:11111111111}
q_k=a_kq_{k-1}+q_{k-2}\end{equation}则$n=k+1$时,我们把\ref{eq:1111111111}和\ref{eq:11111111111}中的$a_k$用$a_k+\frac{1}{a_{k+1}}$代替.可得\begin{equation}\label{eq:222} p_{k+1}=(a_k+\frac{1}{a_{k+1}})p_{k-1}+p_{k-2}\end{equation}且\begin{equation}\label{eq:22} q_{k+1}=(a_k+\frac{1}{a_{k+1}})q_{k-1}+q_{k-2}\end{equation}\ref{eq:222}即\begin{equation}\label{eq:1224} p_{k+1}=p_k+\frac{p_{k-1}}{a_{k+1}}\end{equation}\ref{eq:22}即\begin{equation}\label{eq:1225} q_{k+1}=q_k+\frac{q_{k-1}}{a_{k+1}}\end{equation}将\ref{eq:1224}和\ref{eq:1225}的右边都乘以$a_{k+1}$,$\frac{p_{k+1}}{q_{k+1}}$的值不会变.因此变为\begin{equation} p_{k+1}=a_{k+1}p_k+p_{k-1}\end{equation}且\begin{equation}
q_{k+1}=a_{k+1}q_k+q_{k-1}\end{equation}根据数学归纳法,命题得证.