# 调和数

调和数是前 n 个正整数倒数之和，

\[ H_n = \sum_{k=1}^{n} \frac{1}{k} = 1 + \frac{1}{2} + \frac{1}{3} + \cdots + \frac{1}{n}, \]

之所以称为调和数，是因为它是调和级数的部分和。最初几个值为 H₁ = 1、H₂ = 3/2、H₃ = 11/6、H₄ = 25/12。调和数出现在分析学、数论与算法分析中，其极限行为定义了欧拉-马歇罗尼常数。<sup>[1](https://mathworld.wolfram.com/HarmonicNumber.html)</sup>

| 关键事实 | 详情 |
|---|---|
| 定义 | \( H_n = \sum_{k=1}^{n} 1/k \)，即调和级数的第 n 个部分和<sup>[1](https://mathworld.wolfram.com/HarmonicNumber.html)</sup> |
| 递推 | \( H_n = H_{n-1} + 1/n \)，其中 \( H_1 = 1 \)<sup>[1](https://mathworld.wolfram.com/HarmonicNumber.html)</sup> |
| 解析形式 | \( H_n = \gamma + \psi_0(n+1) \)，其中 \( \gamma \) 为欧拉-马歇罗尼常数，\( \psi_0 \) 为双伽马函数<sup>[1](https://mathworld.wolfram.com/HarmonicNumber.html)</sup> |
| 增长 | \( H_n \sim \ln n + \gamma + \frac{1}{2n} - \frac{1}{12n^2} + \frac{1}{120n^4} - \cdots \)<sup>[1](https://mathworld.wolfram.com/HarmonicNumber.html)</sup> |
| 整性 | 对 \( n \ge 2 \)，\( H_n \) 永远不是整数；此结果由泰辛格于 1915 年证明<sup>[1](https://mathworld.wolfram.com/HarmonicNumber.html)</sup> |
| 推广 | \( H_{n,r} = \sum_{k=1}^{n} 1/k^r \)，且 \( \lim_{n\to\infty} H_{n,r} = \zeta(r) \)<sup>[1](https://mathworld.wolfram.com/HarmonicNumber.html)</sup><sup> • </sup><sup>[2](https://www.itl.nist.gov/div898/software/dataplot/refman2/auxillar/harmnumb.htm)</sup> |
| 算法中的作用 | n 个元素快速排序的期望比较次数：\( E[C_n] = 2(n+1)H_n - 4n \)<sup>[3](https://sites.math.rutgers.edu/~zeilberg/akherim/QuickSortYukunYao.pdf)</sup> |

## 基本性质

定义所给出的递推——每一步增加一个新项——使调和数成为对数的离散类比。每个增量 \( 1/n \) 随 n 增大而缩小，但部分和却无界增长，因为底层的调和级数发散；这一发散性最早由尼科尔·奥雷斯姆（Nicole d'Oresme，约1323–1382）通过将各项按 2、4、8 等分块分组、每块之和均超过 1/2 的方式予以证明，其后彼得罗·门戈利在 1647 年、约翰·伯努利与雅各布·伯努利在 1687 年后不久又分别给出了证明。<sup>[1](https://mathworld.wolfram.com/HarmonicNumber.html)</sup><sup> • </sup><sup>[4](https://mathworld.wolfram.com/HarmonicSeries.html)</sup>

写成最简分数时，每个调和数的分子为奇数、分母为偶数。这一算术事实构成了最古老的非整性论证的基础：泰辛格于 1915 年证明，对 n > 1，\( H_n \) 永远不是整数；屈尔沙克于 1918 年推广了这一结果，证明调和级数中任意多个连续项（不必从 1 开始）之和永远不是整数。现代证明使用 2-进赋值：和中各分母所含 2 的最高幂恰好只出现在一项之中，因此该和不可能为整数。<sup>[1](https://mathworld.wolfram.com/HarmonicNumber.html)</sup><sup> • </sup><sup>[5](https://proofwiki.org/wiki/Harmonic_Number_is_not_Integer)</sup>

## 与对数及欧拉-马歇罗尼常数的关系

\( H_n \) 与 \( \ln n \) 之差并不增长：序列 \( \gamma_n = H_n - \ln n \) 收敛于欧拉-马歇罗尼常数，

\[ \gamma = \lim_{n \to \infty} (H_n - \ln n) = 0.5772156649015328606\ldots \]

欧拉于 1735 年首次定义该常数，符号 \( \gamma \) 则由马歇罗尼于 1790 年引入。<sup>[6](https://mathworld.wolfram.com/Euler-MascheroniConstant.html)</sup> 简单的不等式刻画了两者的接近程度：\( \frac{1}{2(n+1)} < H_n - \ln n - \gamma < \frac{1}{2n} \)，而德坦普尔的一个更精细的界将 \( \ln n \) 替换为 \( \ln(n + 1/2) \)，并将误差窗口替换为 \( 1/(24n^2) \) 的倍数。<sup>[1](https://mathworld.wolfram.com/HarmonicNumber.html)</sup>

精确的解析表达式为 \( H_n = \gamma + \psi_0(n+1) \)，其中 \( \psi_0 \)（双伽马函数）是伽马函数的对数导数；这一关系将调和数延拓到非整数与复数自变量。<sup>[1](https://mathworld.wolfram.com/HarmonicNumber.html)</sup><sup> • </sup><sup>[4](https://mathworld.wolfram.com/HarmonicSeries.html)</sup>

## 渐近性与近似

欧拉-麦克劳林求和给出渐近级数

\[ H_n \sim \ln n + \gamma + \frac{1}{2n} - \frac{1}{12n^2} + \frac{1}{120n^4} - \frac{1}{252n^6} + \cdots, \]

其中一般项（第 2n 项）涉及 \( \zeta(1-2n) \)。<sup>[1](https://mathworld.wolfram.com/HarmonicNumber.html)</sup> 由于前几项已能给出很高精度，这一展开是在 n 很大时不必逐项求和 n 项而计算 \( H_n \) 的标准方法。近期工作仍在不断改进近似：河南理工大学陈超平与特尔戈维什泰瓦拉希亚大学克里斯蒂内尔·莫尔蒂奇于 2025 年发表的一篇论文为 \( H_n \) 构造了新的不等式与渐近级数，其中包括形如 \( \gamma - \ln(e^{1/(n+1)} - 1) + a(n) < H_n < \gamma - \ln(e^{1/(n+1)} - 1) + b(n) \) 的界。<sup>[7](https://link.springer.com/article/10.1007/s00025-025-02355-z)</sup>

增长的缓慢有一个惊人的数值面貌。使 \( H_n \) 超过 1、2、3……所需的项数依次为 1、4、11、31、83、227、616、1674、4550、12367、33617……；在 \( 2.5 \times 10^{8} \) 项之后，和仍低于 20，而要超过 100 则需要多于 \( 1.509 \times 10^{43} \) 项。<sup>[4](https://mathworld.wolfram.com/HarmonicSeries.html)</sup>

## 应用

**优惠券收集。** 在优惠券收集问题中，收集全部 n 种优惠券所需的期望购买次数为 \( n \cdot H_n \)，约为 \( n \ln n \)：等待第 i 种新优惠券的期望为 \( n/(n-i+1) \)，由线性性将这些期望相加便得到 n 乘以第 n 个调和数。<sup>[8](https://www.cs.tufts.edu/comp/250P/classpages/coupon.html)</sup>

**排序。** 调和数给出了快速排序精确的平均情形代价。对含 n 个互异元素的列表，单枢轴快速排序的期望比较次数为 \( E[C_n] = 2(n+1)H_n - 4n \)，其方差涉及广义调和数 \( H_{k}(n) = \sum_{i=1}^{n} 1/i^k \)；同样的公式对双枢轴快速排序也成立。<sup>[3](https://sites.math.rutgers.edu/~zeilberg/akherim/QuickSortYukunYao.pdf)</sup> 由于 \( H_n = \ln n + O(1) \)，这便给出熟知的 \( 2n \ln n + O(n) \) 平均行为。<sup>[9](https://www.cs.upc.edu/~conrado/research/talks/dmd06.pdf)</sup>

**级数恒等式。** 以调和数为权的无穷级数求值为 zeta 值。欧拉于 1775 年发现 \( \sum_{n=1}^{\infty} H_n/n^2 = 2\zeta(3) \)，博尔韦因兄弟则证明 \( \sum H_n^2/n^2 = \frac{17}{4}\zeta(4) = \frac{17\pi^4}{360} \)；此类和称为欧拉和，与多重 zeta 值相联系。<sup>[1](https://mathworld.wolfram.com/HarmonicNumber.html)</sup><sup> • </sup><sup>[10](https://onlinelibrary.wiley.com/doi/10.1155/2014/501906)</sup>

## 广义调和数

r 阶广义调和数为

\[ H_{n,r} = \sum_{k=1}^{n} \frac{1}{k^r}, \]

其中 \( H_{n,1} = H_n \)。随着 n 增大，它们收敛于黎曼 zeta 函数的值，\( \lim_{n\to\infty} H_{n,r} = \zeta(r) \)；特别地 \( H_{n,2} \to \zeta(2) = \pi^2/6 \)。\( H_{n,2} \) 的分子称为沃斯滕霍尔姆数。广义调和数出现在数论、理论物理与算法分析中，它们正是构造 zeta 函数本身的有限截断。<sup>[1](https://mathworld.wolfram.com/HarmonicNumber.html)</sup><sup> • </sup><sup>[2](https://www.itl.nist.gov/div898/software/dataplot/refman2/auxillar/harmnumb.htm)</sup><sup> • </sup><sup>[11](https://www.sciencedirect.com/science/article/pii/S0895717711003025)</sup>

## 名称与历史

“调和”一词反映了与音乐和声的联系：塔兰托的阿基塔斯（Archytas of Tarentum，约公元前350年）的一段残篇已在音乐语境中区分了算术平均、几何平均与“反称”（调和）平均，尼科马库斯后来则通过项与差的契合来解释调和比例。<sup>[12](https://mathshistory.st-andrews.ac.uk/Miller/mathword/h/)</sup> 列维·本·格森（Levi ben Gerson，1288–1344）的一部三角学论著以《论调和数》（*De numeris harmonicis*）为题译成拉丁文，而“调和级数”一语出现在《钱伯斯百科全书》（1727–51）中，被定义为“由许多数按连续调和比例构成的级数”。<sup>[12](https://mathshistory.st-andrews.ac.uk/Miller/mathword/h/)</sup><sup> • </sup><sup>[13](https://www.math.drexel.edu/~tolya/Kullman_harmonic_series)</sup>

## References

1. [Harmonic Number, Wolfram MathWorld](https://mathworld.wolfram.com/HarmonicNumber.html)
2. [Harmonic Number, NIST Dataplot documentation](https://www.itl.nist.gov/div898/software/dataplot/refman2/auxillar/harmnumb.htm)
3. [Yukun Yao and Doron Zeilberger, A Detailed Analysis of Quicksort Algorithms, Rutgers University](https://sites.math.rutgers.edu/~zeilberg/akherim/QuickSortYukunYao.pdf)
4. [Harmonic Series, Wolfram MathWorld](https://mathworld.wolfram.com/HarmonicSeries.html)
5. [Harmonic Number is not Integer, ProofWiki](https://proofwiki.org/wiki/Harmonic_Number_is_not_Integer)
6. [Euler-Mascheroni Constant, Wolfram MathWorld](https://mathworld.wolfram.com/Euler-MascheroniConstant.html)
7. [Chao-Ping Chen and Cristinel Mortici (2025). Approximations of the Harmonic Numbers. Results in Mathematics 80, 35.](https://link.springer.com/article/10.1007/s00025-025-02355-z)
8. [The Coupon Collector Problem, Tufts University CS 250P](https://www.cs.tufts.edu/comp/250P/classpages/coupon.html)
9. [Conrado Martínez, Chunksort: A Generalized Partial Sort Algorithm (talk slides), UPC](https://www.cs.upc.edu/~conrado/research/talks/dmd06.pdf)
10. [Junesang Choi (2014). Summation Formulas Involving Binomial Coefficients, Harmonic Numbers, and Generalized Harmonic Numbers. Abstract and Applied Analysis.](https://onlinelibrary.wiley.com/doi/10.1155/2014/501906)
11. [Some summation formulas involving harmonic numbers and generalized harmonic numbers, Applied Mathematics and Computation](https://www.sciencedirect.com/science/article/pii/S0895717711003025)
12. [Earliest Known Uses of Some of the Words of Mathematics (H), MacTutor History of Mathematics](https://mathshistory.st-andrews.ac.uk/Miller/mathword/h/)
13. [What's Harmonic about the Harmonic Series?, Drexel University](https://www.math.drexel.edu/~tolya/Kullman_harmonic_series)

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

Topic: 物质世界与数学 › 数学与统计学 › 数与代数 › Arithmetic and number systems › Integer sequences and partitions › Integer sequences

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/harmonic-number

English original: https://www.edgepedia.org/harmonic-number
