# 贝尔数

**贝尔数**（Bell number）是将一个含 n 个带标号元素的集合划分为若干非空、互不相交子集的方法数；第 n 个贝尔数记作 B(n) 或 B_n，该序列从 n = 0 到 8 依次为 1, 1, 2, 5, 15, 52, 203, 877, 4140。<sup>[1](https://oeis.org/A000110)</sup> 同样的数也计数一首 n 行诗的不同韵式：3 行时有 5 种韵式，即 aaa、aab、aba、abb 和 abc，因为韵式为每一行指定一个字母，而两行同韵当且仅当它们共享划分中的同一个块。<sup>[1](https://oeis.org/A000110)</sup><sup> • </sup><sup>[2](https://arxiv.org/abs/2602.01350)</sup>

| 关键事实 | 详情 |
|---|---|
| 定义 | B(n) 计数 {1, 2, ..., n} 的划分数，其中 B(0) = 1。<sup>[3](https://dlmf.nist.gov/26.7)</sup> |
| 精确公式 | B(n) = 第二类斯特林数 S(n, k) 对 k = 0 到 n 的求和。<sup>[3](https://dlmf.nist.gov/26.7)</sup> |
| 生成函数 | 指数生成函数为 ∑_{n=0}^∞ B(n) x^n/n! = exp(e^x − 1)。<sup>[3](https://dlmf.nist.gov/26.7)</sup> |
| 递推关系 | B(n+1) = binom(n, k) B(k) 对 k = 0 到 n 的求和。<sup>[3](https://dlmf.nist.gov/26.7)</sup> |
| 多宾斯基公式 | 对 n ≥ 1，B(n) = e^(−1) 乘以 k^n/k! 对 k ≥ 1 的求和；在 k = 2n 处截断并加 1 即得精确整数。<sup>[3](https://dlmf.nist.gov/26.7)</sup> |
| 同余 | 图沙尔同余 B(n+p) ≡ B(n) + B(n+1) (mod p) 对每个素数 p 成立。<sup>[4](https://arxiv.org/html/2110.06129)</sup> |
| 增长 | log B(n)/n = log n − log log n − 1 + ...，首项渐近由朗伯W函数支配。<sup>[3](https://dlmf.nist.gov/26.7)</sup><sup> • </sup><sup>[5](https://fredrikj.net/blog/2015/08/computing-bell-numbers/)</sup> |
| 命名 | 由贝克尔（Becker）和里奥丹（Riordan）于 1948 年以埃里克·坦普尔·贝尔（Eric Temple Bell，1883–1960）命名；这些数本身可追溯至江户时代的日本。<sup>[1](https://oeis.org/A000110)</sup><sup> • </sup><sup>[6](https://www.combinatorics.org/ojs/index.php/eljc/article/download/v29i2p2/pdf)</sup> |

## 计数解释

定义性对象是集合划分。{1, ..., n} 的一个划分是一族非空子集（称为块），其中每个元素恰好出现在一个块中；B(n) 计数所有这样的族，而 B(0) = 1 计数空集的唯一空划分。<sup>[3](https://dlmf.nist.gov/26.7)</sup>

**包含 n 的块。** 基本递推关系来自分离出包含元素 n + 1 的块：若该块包含其余 n 个元素中的 k 个，选取方式有 binom(n, k) 种，则剩余的 n − k 个元素构成任意划分。对 k 求和即得 B(n+1) = binom(n, k) B(k) 对 k = 0 到 n 的求和。<sup>[3](https://dlmf.nist.gov/26.7)</sup> 一个等价形式改为固定一个块中的最小元素：B(n) = C(n−1, k−1) B(n−k) 对 k = 1 到 n 的求和。<sup>[7](https://opentext.uleth.ca/Combinatorics/sect_gen-fns-apps-BellNumbers.html)</sup>

**韵式与因式分解。** 韵式是一串字母，其中最左边的字母为 a，且任何字母不超过其左侧最大字母加一；两行押韵当且仅当它们带有相同字母，因此韵式与集合划分一一对应。<sup>[1](https://oeis.org/A000110)</sup> B(n) 也计数将一个由 n 个不同素数构成的乘积分解为大于 1 的因子的方法数，因为每个因式分解都把素数分成若干块。<sup>[8](https://fq.math.ca/Books/Collection/shallit.pdf)</sup>

## 公式与贝尔三角形

**斯特林数。** 第二类斯特林数 S(n, k) 计数将一个 n 元集合划分为恰好 k 个块的方法数，因此对 k 求和即得总数：B(n) = S(n, k) 对 k = 0 到 n 的求和。<sup>[3](https://dlmf.nist.gov/26.7)</sup><sup> • </sup><sup>[9](https://ajc-new.maths.uq.edu.au/download/58/ajc_v58_p264.pdf)</sup> 用生成函数的语言说，贝尔数是常数序列 1, 1, 1, ... 的斯特林变换。<sup>[10](https://mathworld.wolfram.com/BellNumber.html)</sup>

**指数生成函数。** 级数 ∑_{n=0}^∞ B(n) x^n/n! = exp(e^x − 1) 决定了整个序列；等价地，B(n) 是 exp(e^x − 1) 中 x^n 系数的 n! 倍。<sup>[3](https://dlmf.nist.gov/26.7)</sup><sup> • </sup><sup>[11](https://functions.wolfram.com/IntegerFunctions/BellB/02/0001/)</sup>

**贝尔三角形。** 这个三角形在形式上类似于帕斯卡三角形，由以下规则构建：B'(0,0) = 1，对 n > 1 有 B'(n,0) = B'(n−1, n−1)（每一行以上一行的最后一个条目开始），以及 B'(n, r) = B'(n, r−1) + B'(n−1, r−1)（每个内部条目是其左邻与左上邻之和）。<sup>[8](https://fq.math.ca/Books/Collection/shallit.pdf)</sup><sup> • </sup><sup>[5](https://fredrikj.net/blog/2015/08/computing-bell-numbers/)</sup> 各行依次为 1；1 2；2 3 5；5 7 10 15；15 20 27 37 52；52 67 87 114 151 203，贝尔数出现在三角形的左右两边缘，且 B'(n, 0) = B(n)。<sup>[8](https://fq.math.ca/Books/Collection/shallit.pdf)</sup>

**多宾斯基公式。** 对 n ≥ 1，公式 B(n) = e^(−1) 乘以 k^n/k! 对 k ≥ 1 的求和将 B(n) 表示为各项为有理数、总和为整数的无穷级数。该级数收敛足够快，使得有限截断 B(n) = 1 + floor(e^(−1) 乘以 k^n/k! 对 k = 1 到 2n 的求和) 是精确的；实际上略多于 n 项即可精确确定 B(n)。<sup>[3](https://dlmf.nist.gov/26.7)</sup><sup> • </sup><sup>[5](https://fredrikj.net/blog/2015/08/computing-bell-numbers/)</sup> 多宾斯基于 1877 年使用该公式计算了 B(1) 到 B(8)。<sup>[12](https://mathweb.ucsd.edu/~revans/Chapter3.pdf)</sup>

## 数值一览

最初的取值，B(0) 到 B(20)，为：<sup>[1](https://oeis.org/A000110)</sup><sup> • </sup><sup>[3](https://dlmf.nist.gov/26.7)</sup>

| n | B(n) | n | B(n) |
|---|---|---|---|
| 0 | 1 | 11 | 678570 |
| 1 | 1 | 12 | 4213597 |
| 2 | 2 | 13 | 27644437 |
| 3 | 5 | 14 | 190899322 |
| 4 | 15 | 15 | 1382958545 |
| 5 | 52 | 16 | 10480142147 |
| 6 | 203 | 17 | 82864869804 |
| 7 | 877 | 18 | 682076806159 |
| 8 | 4140 | 19 | 5832742205057 |
| 9 | 21147 | 20 | 51724158235372 |
| 10 | 115975 | | |

**增长。** 记 N = e^(W_0(n))，其中 W_0 是朗伯W函数的主分支（x ↦ x·e^x 的反函数），则当 n 趋于无穷时，渐近形式为 B(n) = N^n · e^(N−n−1) / (1 + ln N)^(1/2) · (1 + O((ln n)^(1/2)/n^(1/2)))。<sup>[3](https://dlmf.nist.gov/26.7)</sup> 一个等价形式是 B_n ~ n^(−1/2) (n/W(n))^(n+1/2) exp(n/W(n) − n − 1)，而对数增长为 log B_n / n = log n − log log n − 1 + ...。<sup>[5](https://fredrikj.net/blog/2015/08/computing-bell-numbers/)</sup> 一个简单的上界 B_n < (0.792 n / log(n+1))^n 在 n = 20 时为精确值的 4 倍。<sup>[2](https://arxiv.org/abs/2602.01350)</sup> 增长之快足以使计算吃力：B(10^10) 约为 5.145 × 10^82857366966，而 B(10^20) 约为 5.383 × 10^1794956117137290721328。<sup>[5](https://fredrikj.net/blog/2015/08/computing-bell-numbers/)</sup>

**计算。** 已知最好的算法在 n^(2+o(1)) 时间内计算 B_n，相对于结果规模是拟二次的；相比之下，整数分拆数 p(n) 可在 n^(1/2+o(1)) 时间内计算。数三角形算法的复杂度为 n^(3+o(1))，因为它执行 O(n^2) 次加法，每次加法的数各有 n^(1+o(1)) 个二进制位，但其低开销使它在中等 n 时比指数生成函数方法更快。<sup>[5](https://fredrikj.net/blog/2015/08/computing-bell-numbers/)</sup> 通过生成函数一次性计算前 n 个贝尔数，配合二分拆分与牛顿迭代，同样在 n^(2+o(1)) 时间内运行；在 n = 100,000 时，一种实现耗时 858 秒，而一种模方法耗时 164 秒。<sup>[5](https://fredrikj.net/blog/2015/08/computing-bell-numbers/)</sup> 一个由递推关系导出、经形式化验证的动态规划算法收录于 Isabelle 形式证明档案中，因为不用动态规划计算贝尔数是缓慢的。<sup>[13](https://isa-afp.org/browser_info/current/AFP/Frequency_Moments/Bell_Numbers_Spivey.Bell_Numbers.html)</sup> 对于生成所有划分而非计数，2026 年的一项基准测试将三种现代非递归算法（森巴 1984、鄂尔 1988、焦基奇等 1989）与哈钦森 1963 年的经典算法进行比较，发现焦基奇（Djokić）等人的算法最佳。<sup>[2](https://arxiv.org/abs/2602.01350)</sup>

## 算术性质

**图沙尔同余。** 对每个素数 p 和自然数 n，B(n+p) ≡ B(n) + B(n+1) (mod p)；图沙尔（Touchard）于 1933 年得到此式，以及推广形式 B(n + p^m) ≡ m·B(n) + B(n+1) (mod p)，对任意自然数 n、m 和素数 p 成立。<sup>[4](https://arxiv.org/html/2110.06129)</sup> 同一族中的进一步同余包括孔泰（Comtet）的 B(np) ≡ B(n+1) (mod p)（p 为奇素数），以及 M. 祖贝尔（M. Zuber）猜想的超同余 B(np) ≡ B(n+1) (mod np·Z_p)。<sup>[14](http://emis.icm.edu.pl/journals/BBMS/Bulletin/bul964/Robert-Gertsch.pdf)</sup>

**周期性。** 威廉姆斯（Williams）证明了贝尔数模素数 p 是周期的，而霍尔（Hall）发现了周期 N_p = (p^p − 1)/(p − 1) = 1 + p + p^2 + ... + p^(p−1)。<sup>[4](https://arxiv.org/html/2110.06129)</sup><sup> • </sup><sup>[15](https://www.math.nthu.edu.tw/~amen/2023/AMEN-220120.pdf)</sup> N_p 是否为最小周期与阿廷-施赖尔三项式 T(x) = x^p − x − 1 在域 F_p 上具有阶 g(p) = 1 + p + ... + p^(p−1) 有关；这一本原性条件已对所有小于 126 的素数以及 p = 137、149、157、163、167 和 173 验证，对其他素数仍悬而未决。<sup>[4](https://arxiv.org/html/2110.06129)</sup><sup> • </sup><sup>[15](https://www.math.nthu.edu.tw/~amen/2023/AMEN-220120.pdf)</sup> 该序列对每个模 m 都是周期的，m = 1, 2, 3, ... 的周期开头为 1, 3, 13, 12, 781, 39, 137257, 24, 39, 2343, 28531167061, 156。<sup>[10](https://mathworld.wolfram.com/BellNumber.html)</sup>

**奇偶性与整除性。** 模 2 时贝尔数以最小周期 3 重复 1, 1, 0，这是通用周期公式中 p = 2 的情形。<sup>[15](https://www.math.nthu.edu.tw/~amen/2023/AMEN-220120.pdf)</sup> 当 n ≡ 0 或 1 (mod 3) 时，2-进赋值 ν_2(B(n)) 为 0；而当 n ≡ 2 (mod 3) 时，ν_2(B(3n+2)) 的值以周期 4 重复模式 1, 2, 2, 1；特别地，没有贝尔数能被 8 整除，也没有贝尔数模 8 同余于 6。<sup>[16](http://www.math.tulane.edu/~vhm/papers_html/final-bell.pdf)</sup><sup> • </sup><sup>[1](https://oeis.org/A000110)</sup> 一个有限域判据解决了对任意固定整数 k 的同余 B(n) ≡ k (mod p)，并给出库雷帕（Kurepa）猜想——B(p−1) 模 p 不同余于 1——的等价形式，该猜想在一般情况下仍未证明。<sup>[17](https://www.combinatorics.org/ojs/index.php/eljc/article/view/v21i4p49)</sup>

**素数与伪素数取值。** B(n) 本身在指标 2、3、7、13、42、55 和 2841 处为素数，给出素数值 2、5、877、27644437 等；指标 2841 处的值由 I. 拉罗萨·卡内斯特罗（I. Larrosa Canestro）于 2004 年用椭圆曲线素性证明程序 PRIMO 经过 17 个月计算后证明为素数。<sup>[10](https://mathworld.wolfram.com/BellNumber.html)</sup> 贝尔伪素数是一个合数 n，满足 B(n) ≡ 2 (mod n)；最小的是 21361 = 41 × 521，由 W. F. 伦农（W. F. Lunnon）发现。<sup>[1](https://oeis.org/A000110)</sup>

## 与相关序列的比较

**卡塔兰数。** 划分可以通过在圆上放置 n 个点并取每个块的凸包来画出；当一个划分中没有两个凸包相交时，称其为非交叉的。对 n < 4，每个划分都是非交叉的，而 n 元集合的非交叉划分数是卡塔兰数 C_n = (1/(n+1))·binom(2n, n) = 1, 1, 2, 5, 14, 42, ...。由于每个非交叉划分都是划分，C_n 从不超过 B_n，且这两个序列直到 n = 3 都一致，之后开始分歧（C_4 = 14 对 B_4 = 15）。<sup>[18](https://ericmoorhouse.org/handouts/bell_stirling.pdf)</sup>

**斯特林数与变体。** 第二类斯特林数 S(n, k) 通过固定块数来细化贝尔数，而 B(n) 是它们的行和。<sup>[9](https://ajc-new.maths.uq.edu.au/download/58/ajc_v58_p264.pdf)</sup> r-贝尔数 B(n, r) 计数将一个 n + r 元集合划分为若干块、其中 r 个选定元素被分入不同块的方法数；它们满足自己的图沙尔型同余 B(n+p, r) ≡ B(n+1, r) + B(n, r) (mod p) 以及周期性 B(n, r+p) ≡ B(n, r) (mod p)。<sup>[4](https://arxiv.org/html/2110.06129)</sup><sup> • </sup><sup>[19](https://nntdm.net/papers/nntdm-28/NNTDM-28-4-719-729.pdf)</sup> 受限变体，如 m-非连续划分——其中指标相差至多 m 的元素不能同块——也以 m-斐波那契、m-受限、m-正则、m-分离或 m-稀疏划分等名称被研究。<sup>[9](https://ajc-new.maths.uq.edu.au/download/58/ajc_v58_p264.pdf)</sup>

## 应用

**概率。** B(n) 是速率参数 λ = 1 的泊松随机变量的第 n 阶原点矩，即对此类变量有 B(n) = E(X^n)。<sup>[1](https://oeis.org/A000110)</sup> 更一般地，泊松分布的矩由在其均值处求值的贝尔多项式给出。<sup>[20](https://reference.wolfram.com/language/ref/BellB.html.en)</sup>

**贝尔多项式。** 单变量贝尔多项式 BellB[n, x]，也称为指数多项式或完全指数贝尔多项式，推广了这些数：BellB[n] 返回 B(n)，BellB[n, x] 返回多项式。<sup>[20](https://reference.wolfram.com/language/ref/BellB.html.en)</sup> 贝尔数所进行的那种集合划分枚举也支撑着显式生成划分的算法，2026 年的基准测试发现焦基奇等人的生成算法最快。<sup>[2](https://arxiv.org/abs/2602.01350)</sup>

## 历史

已知最早的贝尔数应用出现在 17 世纪一版日本《源氏物语》中，其中它们计数源氏香仪式中排列香棒的方法数。<sup>[12](https://mathweb.ucsd.edu/~revans/Chapter3.pdf)</sup> 江户时代的记录是明确的：松永良弼（Yoshisuke Matsunaga）1726 年的手稿《断连総术》（“分离与连接的总术”）完全致力于计算贝尔数，以枚举源氏香中连接与分离香的方法，后有有马赖徸（Yoriyuki Arima，1714–1783）的澄清与发展。<sup>[6](https://www.combinatorics.org/ojs/index.php/eljc/article/download/v29i2p2/pdf)</sup>

在西方文献中，首次明确出现是在克拉姆普（Kramp）1796 年的一篇论文中，后来出现在泰特（Tate）1845 年的一部论著和 1868 年《数学汇编》（Matematicheskii Sbornik）的一道问题中。<sup>[12](https://mathweb.ucsd.edu/~revans/Chapter3.pdf)</sup> 多宾斯基于 1877 年发表了他的级数公式。<sup>[12](https://mathweb.ucsd.edu/~revans/Chapter3.pdf)</sup> 随后图沙尔（1933）和贝尔（1934）首次在已发表文献中对相关多项式进行了系统研究，贝尔的论文为《指数数》和《指数多项式》，均为 1934 年。<sup>[12](https://mathweb.ucsd.edu/~revans/Chapter3.pdf)</sup><sup> • </sup><sup>[21](https://mathshistory.st-andrews.ac.uk/Biographies/Bell/)</sup> 贝克尔和里奥丹于 1948 年以贝尔命名了这些数。<sup>[1](https://oeis.org/A000110)</sup><sup> • </sup><sup>[6](https://www.combinatorics.org/ojs/index.php/eljc/article/download/v29i2p2/pdf)</sup> MathWorld 称贝尔数的首次系统研究由拉马努金（Ramanujan）在其第二本笔记本第 3 章中完成，大约比贝尔的工作早 25 到 30 年；而拉马努金笔记本的评注则将首次系统研究归功于图沙尔和贝尔的已发表文献；这两种说法可以通过区分未发表笔记本与已发表论文来一致地理解。<sup>[10](https://mathworld.wolfram.com/BellNumber.html)</sup><sup> • </sup><sup>[12](https://mathweb.ucsd.edu/~revans/Chapter3.pdf)</sup>

## References

1. [A000110 – Bell or exponential numbers, OEIS](https://oeis.org/A000110)
2. [Benchmarking of algorithms for set partitions, arXiv:2602.01350](https://arxiv.org/abs/2602.01350)
3. [DLMF §26.7 Set Partitions: Bell Numbers, NIST](https://dlmf.nist.gov/26.7)
4. [Backward Touchard congruence, arXiv:2110.06129](https://arxiv.org/html/2110.06129)
5. [Computing Bell numbers, F. Johansson (fredrikj.net)](https://fredrikj.net/blog/2015/08/computing-bell-numbers/)
6. [Bell Numbers in Matsunaga's and Arima's Genjikō Combinatorics, Electronic Journal of Combinatorics 29(2) (2022)](https://www.combinatorics.org/ojs/index.php/eljc/article/download/v29i2p2/pdf)
7. [Bell numbers and exponential generating functions, University of Lethbridge open combinatorics textbook](https://opentext.uleth.ca/Combinatorics/sect_gen-fns-apps-BellNumbers.html)
8. [The Bell triangle, J. Shallit, Fibonacci Collection manuscript](https://fq.math.ca/Books/Collection/shallit.pdf)
9. [Stirling numbers of the second kind and Bell numbers, Australasian Journal of Combinatorics 58](https://ajc-new.maths.uq.edu.au/download/58/ajc_v58_p264.pdf)
10. [Bell Number, Wolfram MathWorld](https://mathworld.wolfram.com/BellNumber.html)
11. [Bell numbers: primary definition, Wolfram Functions site](https://functions.wolfram.com/IntegerFunctions/BellB/02/0001/)
12. [Ramanujan's Second Notebook, Chapter 3 (B. Berndt commentary), UCSD](https://mathweb.ucsd.edu/~revans/Chapter3.pdf)
13. [Theory Bell_Numbers_Spivey.Bell_Numbers, Archive of Formal Proofs](https://isa-afp.org/browser_info/current/AFP/Frequency_Moments/Bell_Numbers_Spivey.Bell_Numbers.html)
14. [Some congruences concerning the Bell numbers, Robert & Gertsch, Bulletin of the Belgian Mathematical Society](http://emis.icm.edu.pl/journals/BBMS/Bulletin/bul964/Robert-Gertsch.pdf)
15. [Bell Numbers Modulo a Prime Number, Traces and Trinomials, Annals of Mathematics and Informatics (2023)](https://www.math.nthu.edu.tw/~amen/2023/AMEN-220120.pdf)
16. [2-adic valuation of the Bell numbers, Tulane preprint](http://www.math.tulane.edu/~vhm/papers_html/final-bell.pdf)
17. [Bell Numbers Modulo a Prime Number, Traces and Trinomials, Electronic Journal of Combinatorics 21(4) (2014)](https://www.combinatorics.org/ojs/index.php/eljc/article/view/v21i4p49)
18. [Bell and Stirling numbers, lecture notes of E. Moorhouse](https://ericmoorhouse.org/handouts/bell_stirling.pdf)
19. [Congruences via umbral calculus, NNTDM 28(4) (2022)](https://nntdm.net/papers/nntdm-28/NNTDM-28-4-719-729.pdf)
20. [BellB, Wolfram Language documentation](https://reference.wolfram.com/language/ref/BellB.html.en)
21. [Eric Temple Bell (1883–1960), MacTutor History of Mathematics](https://mathshistory.st-andrews.ac.uk/Biographies/Bell/)

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

Topic: 物质世界与数学 › 数学与统计学 › 数与代数 › Arithmetic and number systems › Integer sequences and partitions › Special and named integers › Factorial-like and combinatorial named integers

Copyright 2026 Edgepedia

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

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

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