# 连分数

${\displaystyle x=a_{0}+{\cfrac {1}{a_{1}+{\cfrac {1}{a_{2}+{\cfrac {1}{a_{3}+{\cfrac {1}{\ddots \,}}}}}}}}}$

## 例子

${\displaystyle {\sqrt {2}}=1+{\frac {1}{2+{\cfrac {1}{2+{\cfrac {1}{2+{\cfrac {1}{2+{\cfrac {1}{2+{\cfrac {1}{2+\ddots }}}}}}}}}}}}}$

${\displaystyle {\frac {1}{1}},{\frac {3}{2}},{\frac {7}{5}},{\frac {17}{12}}}$、…

${\displaystyle {\frac {{\sqrt {5}}+1}{2}}=1+{\frac {1}{1+{\cfrac {1}{1+{\cfrac {1}{1+{\cfrac {1}{1+{\cfrac {1}{1+{\cfrac {1}{1+\ddots }}}}}}}}}}}}}$

${\displaystyle {\frac {1}{1}},{\frac {2}{1}},{\frac {3}{2}},{\frac {5}{3}},{\frac {8}{5}},{\frac {13}{8}}}$、…

${\displaystyle \pi =3+{\frac {1}{7+{\cfrac {1}{15+{\cfrac {1}{1+{\cfrac {1}{292+{\cfrac {1}{1+{\cfrac {1}{1+\ddots }}}}}}}}}}}}}$ 由此得到圆周率的渐近分数${\displaystyle {\frac {3}{1}},{\frac {22}{7}}}$约率）、${\displaystyle {\frac {333}{106}},{\frac {355}{113}}}$密率）、${\displaystyle {\frac {103993}{33102}}}$、…

## 动机

${\displaystyle r=\sum _{i=0}^{\infty }a_{i}10^{-i}}$

• 一个有理数的连分数表示是有限的。
• “简单”有理数的连分数表示是简短的。
• 任何有理数的连分数表示是唯一的，如果它没有尾随的1。（${\displaystyle [a_{0};a_{1},\ldots ,a_{n},1]=[a_{0};a_{1},\ldots ,a_{n}+1]}$
• 无理数的连分数表示是唯一的。
• 连分数的项会循环当且仅当它是一个二次无理数（即整数系数的二次方程的实数解）的连分数表示[1][2]
• x的截断连分数表示很早产生x的在特定意义上“最佳可能”的有理数逼近（参阅下述定理5推论1）。

## 连分数表示的算法

${\displaystyle 3\,}$ ${\displaystyle 3.245-3\,}$ ${\displaystyle =0.245\,}$ ${\displaystyle {\frac {1}{0.245}}\,}$ ${\displaystyle =4.082...\,}$
${\displaystyle 4\,}$ ${\displaystyle 4.082...-4\,}$ ${\displaystyle =0.082...\,}$ ${\displaystyle {\frac {1}{0.082...}}\,}$ ${\displaystyle =12.250\,}$
${\displaystyle 12\,}$ ${\displaystyle 12.250-12\,}$ ${\displaystyle =0.250\,}$ ${\displaystyle {\frac {1}{0.250}}\,}$ ${\displaystyle =4.000\,}$
${\displaystyle 4\,}$ ${\displaystyle 4.000-4\,}$ ${\displaystyle =0.000\,}$ 停止
3.245的连分数是${\displaystyle [3;4,12,4]}$
${\displaystyle 3.245=3+{\cfrac {1}{4+{\cfrac {1}{12+{\cfrac {1}{4}}}}}}}$

## 连分数的表示法

${\displaystyle x=[a_{0};a_{1},a_{2},a_{3}]\;}$

${\displaystyle x=a_{0}+{\frac {1\mid }{\mid a_{1}}}+{\frac {1\mid }{\mid a_{2}}}+{\frac {1\mid }{\mid a_{3}}}}$

${\displaystyle x=a_{0}+{1 \over a_{1}+}{1 \over a_{2}+}{1 \over a_{3}+}}$

${\displaystyle x=\left\langle a_{0};a_{1},a_{2},a_{3}\right\rangle \;}$

${\displaystyle [a_{0};a_{1},a_{2},a_{3},\,\ldots ]=\lim _{n\to \infty }[a_{0};a_{1},a_{2},\,\ldots ,a_{n}]}$

${\displaystyle x=a_{0}+{\underset {i=1}{\overset {3}{\mathrm {K} }}}~{\frac {1}{a_{i}}}\;}$

## 有限连分数

${\displaystyle [a_{0};a_{1},a_{2},a_{3},\,\ldots ,a_{n},1]=[a_{0};a_{1},a_{2},a_{3},\,\ldots ,a_{n}+1]\;}$

${\displaystyle 2.25={\frac {9}{4}}=[2;3,1]=[2;4]\;}$
${\displaystyle -4.2=-{\frac {21}{5}}=[-5;1,3,1]=[-5;1,4]\;}$

## 连分数的倒数

${\displaystyle 2.25={\frac {9}{4}}=[2;4]\;}$
${\displaystyle {\frac {1}{2.25}}={\frac {4}{9}}=[0;2,4]\;}$

## 无限连分数

${\displaystyle {\frac {a_{0}}{1}},\qquad {\frac {a_{1}a_{0}+1}{a_{1}}},\qquad {\frac {a_{2}(a_{1}a_{0}+1)+a_{0}}{a_{2}a_{1}+1}},\qquad {\frac {a_{3}[a_{2}(a_{1}a_{0}+1)+a_{0}]+(a_{1}a_{0}+1)}{a_{3}(a_{2}a_{1}+1)+a_{1}}}}$

${\displaystyle h_{n}=a_{n}h_{n-1}+h_{n-2},\qquad k_{n}=a_{n}k_{n-1}+k_{n-2}}$

${\displaystyle {\frac {h_{n}}{k_{n}}}={\frac {a_{n}h_{n-1}+h_{n-2}}{a_{n}k_{n-1}+k_{n-2}}}}$

## 一些有用的定理

 ${\displaystyle h_{n}=a_{n}h_{n-1}+h_{n-2}\,}$ ${\displaystyle h_{-1}=1\,}$ ${\displaystyle h_{-2}=0\,}$ ${\displaystyle k_{n}=a_{n}k_{n-1}+k_{n-2}\,}$ ${\displaystyle k_{-1}=0\,}$ ${\displaystyle k_{-2}=1\,}$

### 定理1

${\displaystyle \left[a_{0};a_{1},\,\dots ,a_{n-1},x\right]={\frac {xh_{n-1}+h_{n-2}}{xk_{n-1}+k_{n-2}}}}$

### 定理2

${\displaystyle [a_{0},a_{1},a_{2},\ldots ]}$的收敛以

${\displaystyle \left[a_{0};a_{1},\,\dots ,a_{n}\right]={\frac {h_{n}}{k_{n}}}}$

### 定理3

${\displaystyle k_{n}h_{n-1}-k_{n-1}h_{n}=(-1)^{n}\,}$

${\displaystyle \left|{\frac {h_{n}}{k_{n}}}-{\frac {h_{n-1}}{k_{n-1}}}\right|=\left|{\frac {h_{n}k_{n-1}-k_{n}h_{n-1}}{k_{n}k_{n-1}}}\right|={\frac {1}{k_{n}k_{n-1}}}}$

${\displaystyle a_{0}+\sum _{n=0}^{\infty }{\frac {(-1)^{n}}{k_{n+1}k_{n}}}}$

${\displaystyle {\begin{bmatrix}h_{n}&h_{n-1}\\k_{n}&k_{n-1}\end{bmatrix}}}$

### 定理4

${\displaystyle \left|x_{r}-x_{n}\right|>\left|x_{s}-x_{n}\right|}$

### 定理5

${\displaystyle {\frac {1}{k_{n}(k_{n+1}+k_{n})}}<\left|x-{\frac {h_{n}}{k_{n}}}\right|<{\frac {1}{k_{n}k_{n+1}}}}$

## 半收敛

${\displaystyle {\frac {h_{n-1}+ah_{n}}{k_{n-1}+ak_{n}}}}$

## 连分数历史

Cataldi表示连分数为${\displaystyle a_{0}.\,}$ &${\displaystyle n_{1} \over d_{1}}$。&${\displaystyle n_{2} \over d_{2}}$。&${\displaystyle {n_{3} \over d_{3}}}$带有指示随后连分数要去的地方的点
• 1695年－约翰·沃利斯，《Opera Mathematica》 - 介入了术语“连分数”
• 1780年－约瑟夫·拉格朗日 - 使用类似于Bombell的连分数提供了佩尔方程的通用解
• 1748 莱昂哈德·欧拉，《Introductio in analysin infinitorum》. Vol. I, Chapter 18 - 证明了特定形式的连分数和广义无穷级数的等价性
• 1813年－卡尔·弗里德里希·高斯，《Werke》,第三册, 134-138页 - 通过涉及到超几何级数的一个聪明的恒等式推导出非常一般性的复数值的连分数

## 注释

1. ^ Kenneth H. Rosen. Elementary Number Theory and Its Applications.
2. ^ 存档副本. [2007-05-31]. （原始内容存档于2007-04-16）.
3. ^ （前苏联）辛钦著，刘诗俊、刘绍越译. 连分数. 上海: 上海科学技术出版社. 1965: 28–29 [2012-09-16]. （原始内容存档于2021-04-02）.

## 参考文献

• （前苏联）辛钦（A. Ya. Khinchin）著，刘诗俊、刘绍越译. 连分数. 上海: 上海科学技术出版社. 1965.
• Oskar Perron, Die Lehre von den Kettenbrüchen, Chelsea Publishing Company, New York, NY 1950.
• Andrew M. Rockett and Peter Szusz, Continued Fractions, World Scientific Press, 1992 ISBN 978-981-02-1052-6
• H. S. Wall, Analytic Theory of Continued Fractions, D. Van Nostrand Company, Inc., 1948 ISBN 978-0-8284-0207-1