# 法里数列

n 阶法里数列记作 F_n，是所有满足 0 ≤ a ≤ b ≤ n 的不可约分数 a/b 按大小递增排列而成的列表。<sup>[1](https://mathworld.wolfram.com/FareySequence.html)</sup> 它开头几项是 F_1 = {0/1, 1/1}，F_2 = {0/1, 1/2, 1/1}，F_3 = {0/1, 1/3, 1/2, 2/3, 1/1}，以及 F_4 = {0/1, 1/4, 1/3, 1/2, 2/3, 3/4, 1/1}。<sup>[1](https://mathworld.wolfram.com/FareySequence.html)</sup> 这个数列是数论的基本对象：它以有限步穷尽 0 与 1 之间的有理数，编码了实数能被分数逼近到什么程度，并与连分数、福特圆和模群相联系。

| 关键事实 | 细节 |
|---|---|
| 定义 | 所有满足 0 ≤ a ≤ b ≤ n 的既约分数 a/b，按递增顺序排列<sup>[1](https://mathworld.wolfram.com/FareySequence.html)</sup> |
| 长度 | \( |F_n| = 1 + \sum_{k=1}^{n} \varphi(k) \)，其中 φ 为欧拉函数；取值 2, 3, 5, 7, 11, 13, 19, ...<sup>[1](https://mathworld.wolfram.com/FareySequence.html)</sup> |
| 渐近大小 | \( |F_n| \sim 3n^2/\pi^2 \approx 0.3039635509\,n^2 \)<sup>[1](https://mathworld.wolfram.com/FareySequence.html)</sup> |
| 相邻性质 | 相邻两项 a/b 与 c/d 满足 bc − ad = 1<sup>[2](https://www.maths.ed.ac.uk/~v1ranick/fareyproject.pdf)</sup> |
| 中位性质 | 对连续三项而言，中间一项是其相邻两项的中位分数 (p + p'')/(q + q'')<sup>[1](https://mathworld.wolfram.com/FareySequence.html)</sup> |
| 对称性 | 除 F_1 外，每个 F_n 都有奇数项，中间一项为 1/2<sup>[1](https://mathworld.wolfram.com/FareySequence.html)</sup> |
| 历史 | 最早由夏尔·阿罗（Charles Haros）制表（1801 或 1802 年，各家说法不一）；以约翰·法里（John Farey）命名，他 1816 年的短文陈述了该性质而未加证明<sup>[3](https://proofwiki.org/wiki/Definition%3AFarey_Sequence/Historical_Note)</sup><sup> • </sup><sup>[4](https://mathshistory.st-andrews.ac.uk/Biographies/Farey/)</sup> |

## 数列的结构

有两条性质支配着这个数列的构造方式。第一，法里数列中任意两个相邻分数 a/b < c/d 都是法里相邻项，即满足 bc − ad = 1；反之，0 与 1 之间两个满足 bc − ad = 1 的既约分数，必在某个法里数列中以相邻项出现。<sup>[2](https://www.maths.ed.ac.uk/~v1ranick/fareyproject.pdf)</sup> 例如在 F_6 中，连续两项 1/3 与 2/5 满足 3·2 − 1·5 = 1。<sup>[5](https://r-knott.surrey.ac.uk/Fractions/fareySB.html)</sup>

第二，两个分数 a/b 与 c/d 的中位分数是 (a + c)/(b + d)，即分子与分母分别相加而成。它总是严格位于两个母分数之间，因为由 bc − ad > 0 可推出 a/b < (a+c)/(b+d) < c/d。<sup>[2](https://www.maths.ed.ac.uk/~v1ranick/fareyproject.pdf)</sup> 中位分数不是分数的普通加法，而当两个母分数是法里相邻项时，它自动给出既约分数。<sup>[2](https://www.maths.ed.ac.uk/~v1ranick/fareyproject.pdf)</sup> 对法里数列中连续三项 p/q, p'/q', p''/q''，中间一项等于中位分数 (p + p'')/(q + q'')，这一陈述等价于相邻条件 qp' − pq' = 1。<sup>[1](https://mathworld.wolfram.com/FareySequence.html)</sup>

这两条事实给出一种生成配方：从 F_{n−1} 出发，对每一对相邻项 a/b, c/d，只要 b + d = n，就在它们之间插入中位分数 (a + c)/(b + d)，便得到 F_n，因为新出现的 n 阶分数分母只能恰为 n，且必为其相邻项的中位分数。<sup>[1](https://mathworld.wolfram.com/FareySequence.html)</sup> 两个相邻项在后续各阶数列中始终保持相邻，直到它们的中位分数把它们隔开；0/1 与 1/2 在 F_2 中相邻，它们的中位分数 1/3 在 F_3 中把它们隔开。<sup>[2](https://www.maths.ed.ac.uk/~v1ranick/fareyproject.pdf)</sup>

数列关于 1/2 对称：每个分数 a/b 与其补分数 (b − a)/b 配对，因此除中央的 1/2 外，各项成对出现，凡阶数大于 1 的 F_n 都有奇数项。<sup>[1](https://mathworld.wolfram.com/FareySequence.html)</sup><sup> • </sup><sup>[5](https://r-knott.surrey.ac.uk/Fractions/fareySB.html)</sup>

## 项的计数

F_n 的项数恰为

\[ |F_n| = 1 + \sum_{k=1}^{n} \varphi(k), \]

因为对 1 到 n 的每个分母 k，数列中恰有 φ(k) 个以 k 为分母的新分数，φ 为欧拉函数，计算 1 到 k 中与 k 互素的整数个数。<sup>[1](https://mathworld.wolfram.com/FareySequence.html)</sup><sup> • </sup><sup>[6](https://www.nature.com/articles/s41598-021-99545-w)</sup> 欧拉函数的求和函数按 n² 增长，给出渐近律

\[ |F_n| \sim \frac{3n^2}{\pi^2} = 0.3039635509\ldots\; n^2. \]

<sup>[1](https://mathworld.wolfram.com/FareySequence.html)</sup> 因此 1000 阶法里数列大约包含 304,000 个分数。

精确计算 |F_n| 已发展成一门小小的算法产业。通过中位分数枚举数列需要 O(n²) 时间，n 一大便不实用。<sup>[7](https://www.ece.iastate.edu/~alexs/papers/Scientific_Reports_2021/Scientific_Reports_2021_AcceptedManuscript.pdf)</sup> 更快的方法避开枚举：一种基于筛法的算法以 O(n) 时间和 O(n) 内存计算欧拉函数之和，更精巧的算法则可在 O(n^{2/3}) 时间内完成，其中一个变体把内存占用降到 O(√n)。<sup>[6](https://www.nature.com/articles/s41598-021-99545-w)</sup> 相关的计算问题包括给定分数在 F_n 中的秩以及数列上的次序统计量，同样可在 O(n^{2/3}) 时间内求解。<sup>[8](https://arxiv.org/abs/0708.0080)</sup>

## 联系

**福特圆。** 每个分数 p/q 可以画成一个在 x = p/q 处与 x 轴相切、半径为 1/(2q²) 的圆。同一阶上相邻的法里分数给出相切的圆，而 0/1 与 1/1 对应的两个起始圆半径为 1/2，彼此相切。<sup>[5](https://r-knott.surrey.ac.uk/Fractions/fareySB.html)</sup> 半径不小于 1/(2n²) 的福特圆之集合与 F_n 一一对应，而每一阶新增的圆恰是半径最小的那些。<sup>[2](https://www.maths.ed.ac.uk/~v1ranick/fareyproject.pdf)</sup>

**斯特恩-布罗科树。** 从 0/1 与 1/0 出发，反复在相邻项之间插入中位分数，便构建出斯特恩-布罗科树，其中每个正有理数恰好出现一次；此树以莫里茨·斯特恩（Moritz Stern）和阿希尔·布罗科（Achille Brocot）命名，两人约在 1858 至 1860 年间各自独立地写到了它。<sup>[5](https://r-knott.surrey.ac.uk/Fractions/fareySB.html)</sup> 每个法里数列 F_n 都是斯特恩-布罗科树经剪枝得到的子树，而树中通向某个分数的路径编码了它的连分数展开。<sup>[1](https://mathworld.wolfram.com/FareySequence.html)</sup><sup> • </sup><sup>[5](https://r-knott.surrey.ac.uk/Fractions/fareySB.html)</sup>

**丢番图逼近与几何。** 法里分数在丢番图逼近——研究实数能被有理数逼近到何种程度——中扮演根本角色，该数列还通过弗拉内尔-兰道定理与黎曼猜想相联系。<sup>[9](https://arxiv.org/abs/1907.01854)</sup><sup> • </sup><sup>[10](https://arxiv.org/abs/2105.12352)</sup> 法里图的顶点是有理数，两个分数相邻当且仅当它们在某个法里数列中是连续项，模群 PSL(2, Z) 作用于其上。<sup>[11](https://www.mat.univie.ac.at/~slc/opapers/s18jones.html)</sup> 双曲平面的法里镶嵌以 PSL(2, Z) 为对称群，法里三角剖分即由此群在上半平面上的作用产生。<sup>[12](https://mathrepo.mis.mpg.de/farey/index.html)</sup>

该数列的统计性质已被深入研究。相邻法里分数之间间隙的极限分布由 R. R. 霍尔（R. R. Hall）于 1970 年算出，称为霍尔分布；较新的工作把间隙分布与等分布结果推广到 PSL(2, R) 的子群所对应的广义法里数列，以及虚二次数域中的复法里分数。<sup>[9](https://arxiv.org/abs/1907.01854)</sup><sup> • </sup><sup>[13](https://arxiv.org/abs/2407.04380)</sup>

## 历史与名称

这个数列最初出现在把小数换算成简单分数的表中。在法国工作的夏尔·阿罗在《综合工科学校学报》上发表了一张换算表，按递增顺序列出分母小于 100 的所有不可约分数及其小数展开；他用中位分数生成分母更大的分数，并注意到相邻条件 |bc − ad| = 1。<sup>[3](https://proofwiki.org/wiki/Definition%3AFarey_Sequence/Historical_Note)</sup><sup> • </sup><sup>[2](https://www.maths.ed.ac.uk/~v1ranick/fareyproject.pdf)</sup> 各家对年份说法不一：ProofWiki 将该工作定年为 1801 年，而罗恩·诺特的综述、格瑟里的历史著作和 MacTutor 则把发表论文的年份定为 1802 年。<sup>[3](https://proofwiki.org/wiki/Definition%3AFarey_Sequence/Historical_Note)</sup><sup> • </sup><sup>[5](https://r-knott.surrey.ac.uk/Fractions/fareySB.html)</sup><sup> • </sup><sup>[14](https://webhomes.maths.ed.ac.uk/~v1ranick/papers/farey.pdf)</sup><sup> • </sup><sup>[4](https://mathshistory.st-andrews.ac.uk/Biographies/Farey/)</sup>

约翰·法里（John Farey，1766–1826）是英国地质学家和测量师，并非职业数学家。<sup>[4](https://mathshistory.st-andrews.ac.uk/Biographies/Farey/)</sup> 1816 年，他在《哲学杂志》上发表了一篇四段短文《论普通分数的一个奇妙性质》，指出在分母不超过 n 的既约分数的有序列表中，每个内部项都等于其两个相邻项的分子与分母分别相加所得的分数。他给出了 n = 5 的例子，并明确询问这一性质是否已知、是否容许一般性证明。<sup>[4](https://mathshistory.st-andrews.ac.uk/Biographies/Farey/)</sup>

奥古斯丁-路易·柯西（Augustin-Louis Cauchy）读到了法文译本，同年在其《数学练习》中给出证明，并把功劳归于法里，数学界此后大多随柯西将此结果归在他名下。<sup>[4](https://mathshistory.st-andrews.ac.uk/Biographies/Farey/)</sup><sup> • </sup><sup>[3](https://proofwiki.org/wiki/Definition%3AFarey_Sequence/Historical_Note)</sup> 哈代在《一个数学家的辩白》中的评语更为苛刻：“法里之所以不朽，是因为他没能理解一个阿罗早在十四年前就已完美证明的定理。”<sup>[14](https://webhomes.maths.ed.ac.uk/~v1ranick/papers/farey.pdf)</sup> 后来的史家对这一说法提出反驳，指出阿罗的表格与刊物对身在巴黎的柯西来说，远比身在伦敦的法里容易获得，而法里关于德比郡的地质工作也确实受人尊敬；这一公案是斯蒂格勒命名律的标准例证——没有一项科学发现是以其最初的发现者命名的。<sup>[14](https://webhomes.maths.ed.ac.uk/~v1ranick/papers/farey.pdf)</sup> 尽管如此，名称还是沿用了下来：分母不大于 n 的分数排成的那一行，冠的是法里的名字，而不是阿罗的。<sup>[5](https://r-knott.surrey.ac.uk/Fractions/fareySB.html)</sup>

## References

1. [Farey Sequence, Wolfram MathWorld](https://mathworld.wolfram.com/FareySequence.html)
2. [Farey Sequences project notes, University of Edinburgh](https://www.maths.ed.ac.uk/~v1ranick/fareyproject.pdf)
3. [Definition: Farey Sequence/Historical Note, ProofWiki](https://proofwiki.org/wiki/Definition%3AFarey_Sequence/Historical_Note)
4. [John Farey (1766–1826), MacTutor History of Mathematics, University of St Andrews](https://mathshistory.st-andrews.ac.uk/Biographies/Farey/)
5. [Fractions in the Farey Series and the Stern-Brocot Tree, Ron Knott, University of Surrey](https://r-knott.surrey.ac.uk/Fractions/fareySB.html)
6. [V. Sukhoy, A. Stoytchev (2021). Formulas and algorithms for the length of a Farey sequence. Scientific Reports.](https://www.nature.com/articles/s41598-021-99545-w)
7. [Formulas and algorithms for the length of a Farey sequence, accepted manuscript, Iowa State University](https://www.ece.iastate.edu/~alexs/papers/Scientific_Reports_2021/Scientific_Reports_2021_AcceptedManuscript.pdf)
8. [Farey Statistics in Time n^{2/3} and Counting Primitive Lattice Points in Polygons, arXiv](https://arxiv.org/abs/0708.0080)
9. [C. Lutsko (2019). Farey Sequences for Thin Groups. arXiv.](https://arxiv.org/abs/1907.01854)
10. [The Farey Sequence and the Mertens Function, arXiv](https://arxiv.org/abs/2105.12352)
11. [The Farey graph and the modular group, Séminaire Lotharingien de Combinatoire](https://www.mat.univie.ac.at/~slc/opapers/s18jones.html)
12. [Farey polynomials, MATHREPO, Max Planck Institute for Mathematics in the Sciences](https://mathrepo.mis.mpg.de/farey/index.html)
13. [R. Sayous (2024). Gaps in the complex Farey sequence of an imaginary quadratic number field. arXiv.](https://arxiv.org/abs/2407.04380)
14. [S. B. Guthery. History of the Farey Sequence, University of Edinburgh](https://webhomes.maths.ed.ac.uk/~v1ranick/papers/farey.pdf)

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

Topic: 物质世界与数学 › 数学与统计学 › 数与代数 › Number theory › Diophantine problems and approximation › Diophantine approximation

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/farey-sequence

English original: https://www.edgepedia.org/farey-sequence
