# 连分数

每个实数都可展开为正则连分数，即一个由称为部分商的整数组成的序列；当且仅当该数为有理数时，该序列有限，其计算方法是反复对倒数向下取整；若施加某种规范约定，例如要求最后一个部分商大于 1，则展开是唯一的。<sup>[1](https://encyclopediaofmath.org/wiki/Continued_fraction)</sup> *广义*形式是 NIST 数学函数数字图书馆（Digital Library of Mathematical Functions，DLMF）表示许多特殊函数时所采用的框架，其中 Cₙ 是第 n 个近似分数或渐近分数，Aₙ、Bₙ 是第 n 个标准分子和分母。<sup>[2](https://dlmf.nist.gov/1.12)</sup> 约翰·沃利斯（John Wallis）在 1653 年的《无穷算术》（Arithmetica infinitorum）中创造了“连分数”这一术语，不过有些资料将该著作定年为 1655 年或 1656 年。<sup>[3](https://mathworld.wolfram.com/ContinuedFraction.html)</sup>

| 关键事实 | 陈述 |
|---|---|
| 存在性与唯一性 | 每个实数 r 都有唯一的简单连分数，当且仅当 r 为有理数时该展开有限。<sup>[1](https://encyclopediaofmath.org/wiki/Continued_fraction)</sup> |
| 误差界 | 对 r 的渐近分数 Pₙ/Qₙ，有 \|r − Pₙ/Qₙ\| ≤ 1/(QₙQₙ₊₁)，等号仅当 r 等于下一个渐近分数时成立。<sup>[1](https://encyclopediaofmath.org/wiki/Continued_fraction)</sup> |
| 逆判别准则 | 若整数 a、b ≥ 1 满足 \|r − a/b\| ≤ 1/(2b²)，则 a/b 是 r 的渐近分数。<sup>[1](https://encyclopediaofmath.org/wiki/Continued_fraction)</sup> |
| 周期性 | 实数具有最终周期的连分数，当且仅当它是二次无理数（欧拉–拉格朗日定理，Euler–Lagrange theorem）。<sup>[1](https://encyclopediaofmath.org/wiki/Continued_fraction)</sup> |
| 佩尔方程 | 对无平方因子的 d，x² − dy² = 1 总有非平凡解，且所有解都来自 √d 的渐近分数。<sup>[8](https://people.clas.ufl.edu/jeremybooher/files/continued_fractions.pdf)</sup> |
| π 的纪录部分商 | 部分商 292 使渐近分数 355/113 满足 \|π − 355/113\| < 3×10⁻⁷。<sup>[1](https://encyclopediaofmath.org/wiki/Continued_fraction)</sup> |

## 什么是连分数

展开由递归向下取整算法产生：令 a₀ = ⌊r⌋，然后 a₁ = ⌊1/(r − a₀)⌋，a₂ = ⌊1/(r − a₀ − 1/a₁)⌋，依此类推，每一步都把小数余数通过倒数重新送回。<sup>[1](https://encyclopediaofmath.org/wiki/Continued_fraction)</sup> 展开恰好对有理数有限。<sup>[1](https://encyclopediaofmath.org/wiki/Continued_fraction)</sup>

若连分数的渐近分数 Cₙ 当 n → ∞ 时趋于有限极限，则称该连分数收敛。<sup>[2](https://dlmf.nist.gov/1.12)</sup> 广义连分数放宽了分子等于 1 的要求，正是这种自由使它们对特殊函数有用：DLMF 将它们用作标准表示工具，跟踪标准分子 Aₙ 和分母 Bₙ。<sup>[2](https://dlmf.nist.gov/1.12)</sup> 一个经典例子是 (1/2)(e − 1)，其广义展开的分子为等差数列 1、6、10、14、……。<sup>[1](https://encyclopediaofmath.org/wiki/Continued_fraction)</sup>

## 渐近分数及其计算方法

渐近分数是截断展开到 n 项后得到的有限连分数；DLMF 称 Cₙ 为第 n 个近似分数或渐近分数。<sup>[2](https://dlmf.nist.gov/1.12)</sup> 连分数的渐近分数正是由其元素初始序列构成的分数，而分母较小的最佳有理逼近就在其中。<sup>[4](https://math.mit.edu/classes/18.095/2024IAP/L5N.pdf)</sup>

对 π，前几个渐近分数是 3、22/7、333/106、355/113 和 103993/33102，其中 \|π − 22/7\| < 1/742，\|π − 355/113\| < 3×10⁻⁷。<sup>[1](https://encyclopediaofmath.org/wiki/Continued_fraction)</sup> 从 22/7 到 355/113 的跃升，在分母如此之小的情况下质量异常高，下一节解释原因：这是由一个巨大的部分商换来的。

## 用数字说话：渐近分数有多好？

基本的定量界是 \|r − Pₙ/Qₙ\| ≤ 1/(QₙQₙ₊₁)，其中 Qₙ₊₁ 是下一个渐近分数的分母，等号仅当 r 等于那个下一个渐近分数时成立。<sup>[1](https://encyclopediaofmath.org/wiki/Continued_fraction)</sup> 误差大致是第一个被忽略项分母的平方的倒数。<sup>[5](https://mathworld.wolfram.com/RegularContinuedFraction.html)</sup>

当下一个部分商很小时，该界才接近实际误差。反过来，大的部分商使下一个渐近分数格外精确：π 的部分商 292 正是 355/113（分母 113）已经达到 \|π − 355/113\| < 3×10⁻⁷ 的原因，这一误差远低于一般的 1/113² ≈ 7.8×10⁻⁵ 量级。<sup>[1](https://encyclopediaofmath.org/wiki/Continued_fraction)</sup>

也有逆命题。勒让德（Legendre）判别法指出，若整数 a、b ≥ 1 满足 \|r − a/b\| ≤ 1/(2b²)，则 a/b 必是 r 的正则连分数的渐近分数。<sup>[1](https://encyclopediaofmath.org/wiki/Continued_fraction)</sup> 因此 1/b² 这个尺度不仅是渐近分数所能达到的；它也是良好逼近被迫成为渐近分数的阈值。

## 最佳有理逼近

“最佳”的精确含义是分母上界：任何比渐近分数 Pₙ/Qₙ 更接近 r 的有理数 a/b 都必须满足 b > Qₙ。<sup>[1](https://encyclopediaofmath.org/wiki/Continued_fraction)</sup> 换言之，在所有分母不超过 Qₙ 的分数中，没有一个比渐近分数 Pₙ/Qₙ 更好地逼近 r。

都柏林圣三一学院（Trinity College Dublin）的讲义把两个方向合在一起陈述：渐近分数是良好逼近；反过来，足够好的逼近必然是渐近分数。<sup>[6](https://www.maths.tcd.ie/pub/Maths/Courseware/NumberTheory/ContinuedFractions.pdf)</sup> 一个标准的充分判别法是勒让德判别法：若 \|α − a/b\| < 1/(2b²)，且 a/b 为最简分数，则 a/b 是 α 的正则连分数的渐近分数。<sup>[7](https://math.hawaii.edu/~pavel/contfrac.pdf)</sup>

## 二次无理数与周期性

欧拉–拉格朗日定理给出精确刻画：实数 r 是整系数二次多项式的无理根，当且仅当其连分数的不完全商从某一项起是周期的。<sup>[1](https://encyclopediaofmath.org/wiki/Continued_fraction)</sup> 等价地，α 的连分数是周期的，当且仅当 α 是二次根式数，即 Q(√d) 中不属于 Q 的元素。<sup>[6](https://www.maths.tcd.ie/pub/Maths/Courseware/NumberTheory/ContinuedFractions.pdf)</sup> 拉格朗日定理对二次根式数给出同样的结果，最简单的例子是 √2 = [1; 2, 2, 2, …]。<sup>[5](https://mathworld.wolfram.com/RegularContinuedFraction.html)</sup> 麻省理工学院（MIT）讲义将其表述为：展开最终为周期，当且仅当该数满足一个整系数二次方程，即 R = (a + √b)/c。<sup>[4](https://math.mit.edu/classes/18.095/2024IAP/L5N.pdf)</sup>

周期块本身具有结构。

这种周期性是佩尔方程（Pell's equation）x² − dy² = 1 背后的引擎。连分数提供了分析其解以及当 r 相对于 d 较小时其同类方程 x² − dy² = r 的解的方法：所有整数解都来自 √d 的渐近分数。<sup>[8](https://people.clas.ufl.edu/jeremybooher/files/continued_fractions.pdf)</sup> 具体地说，若 d 是正的无平方因子整数，r 满足 r² + \|r\| ≤ d，且正整数 x、y 满足 x² − dy² = r，则 x/y 是 √d 的渐近分数。<sup>[8](https://people.clas.ufl.edu/jeremybooher/files/continued_fractions.pdf)</sup> 此外，对任何无平方因子整数 d，佩尔方程 x² − dy² = 1 都有非平凡解，因此计算 √d 的周期并检验其渐近分数是一种完整的求解方法。<sup>[8](https://people.clas.ufl.edu/jeremybooher/files/continued_fractions.pdf)</sup> 连分数还可用于求解线性丢番图方程，并表达多项式方程的正根。<sup>[5](https://mathworld.wolfram.com/RegularContinuedFraction.html)</sup>

## 与小数及其他方法的比较

连分数提供了一种数的表示，它在某种意义上是通用且规范的，而小数则不是：它不依赖于任意选择的底数。<sup>[7](https://math.hawaii.edu/~pavel/contfrac.pdf)</sup>

洛克斯定理（Lochs' theorem）把这种比较定量化，将正则连分数展开的效率与小数展开的效率联系起来。<sup>[5](https://mathworld.wolfram.com/RegularContinuedFraction.html)</sup> 行为的对比在极端情形下最为鲜明。

## 著名常数与典型数的部分商

π 的前二十五个部分商是 3、7、15、1、292、1、1、1、2、1、3、1、14、2、1、1、2、2、2、2、1、84、2、1、1。<sup>[1](https://encyclopediaofmath.org/wiki/Continued_fraction)</sup> 偶尔出现的大值（292、84、14）打断了原本取值很小的序列。相比之下，e 具有结构化的展开：(1/2)(e − 1) 的广义连分数为 1/(1 + 1/(6 + 1/(10 + 1/(14 + ⋯))))，其分子成等差数列。<sup>[1](https://encyclopediaofmath.org/wiki/Continued_fraction)</sup>

对于“典型”实数，高斯（Gauss）问的是 k 作为部分商出现的概率 cₖ，它自然定义为当 N → ∞ 时 k 在展开前 N 个元素中出现的频率的极限。<sup>[7](https://math.hawaii.edu/~pavel/contfrac.pdf)</sup> 由此得到的高斯–库兹明定理（Gauss–Kuzmin theorem）有两个不同证明，分别由 R. O. 库兹明（R. O. Kuzmin，1928）和 P. 莱维（P. Lévy，1929）独立发现。<sup>[7](https://math.hawaii.edu/~pavel/contfrac.pdf)</sup>

代数数方面仍存在深刻空白。截至《数学百科全书》（Encyclopedia of Mathematics）的陈述（1984），三次及更高次代数数的正则连分数展开尚不清楚，而关于 \(2^{1/3}\) 的部分商有界的断言尚未得到证明。<sup>[1](https://encyclopediaofmath.org/wiki/Continued_fraction)</sup>

## References

1. <a href="https://encyclopediaofmath.org/wiki/Continued_fraction">Continued fraction, Encyclopedia of Mathematics</a>
2. <a href="https://dlmf.nist.gov/1.12">DLMF §1.12: Continued Fractions, NIST</a>
3. <a href="https://mathworld.wolfram.com/ContinuedFraction.html">Continued Fraction, Wolfram MathWorld</a>
4. <a href="https://math.mit.edu/classes/18.095/2024IAP/L5N.pdf">Continued Fraction Notes, MIT 18.095, IAP 2024</a>
5. <a href="https://mathworld.wolfram.com/RegularContinuedFraction.html">Regular Continued Fraction, Wolfram MathWorld</a>
6. <a href="https://www.maths.tcd.ie/pub/Maths/Courseware/NumberTheory/ContinuedFractions.pdf">Chapter 17: Surds and periodic continued fractions, Trinity College Dublin</a>
7. <a href="https://math.hawaii.edu/~pavel/contfrac.pdf">Continued fractions lecture notes, Pavel Guerzhoy, University of Hawaii</a>
8. <a href="https://people.clas.ufl.edu/jeremybooher/files/continued_fractions.pdf">Continued Fractions, Pell's Equation, and Other Applications, Jeremy Booher, University of Florida</a>

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026 · Edited: Sep 30, 2026; Oct 11, 2026; Oct 25, 2026 · Last review: Sep 30, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 数与代数 › Number theory › Elementary number theory › Continued fractions and Diophantine approximation

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/continued-fraction

English original: https://www.edgepedia.org/continued-fraction
