# 卡迈克尔函数

**卡迈克尔函数** λ(n) 是模 n 的整数乘法群的指数：即最小的正整数 λ，使得对于每个与 n 互素的整数 a，都有 \( a^{\lambda} \equiv 1 \pmod{n} \)。<sup>[1](https://encyclopediaofmath.org/wiki/Carmichael_function)</sup> 它也被称为约化欧拉函数或最小通用指数函数。<sup>[2](https://mathworld.wolfram.com/CarmichaelFunction.html)</sup> 美国数学家罗伯特·D·卡迈克尔（Robert D. Carmichael）在 1910 年发表于《美国数学会公报》的论文《关于一个新数论函数的注记》中引入了它。<sup>[3](https://www.scirp.org/reference/referencespapers?referenceid=546939)</sup>

| 关键事实 | 细节 |
|---|---|
| 定义 | 最小的正整数 λ，使得对所有与 n 互素的 a 都有 \( a^{\lambda} \equiv 1 \pmod{n} \)；等价地，是 \( (\mathbb{Z}/n\mathbb{Z})^{\times} \) 的指数<sup>[1](https://encyclopediaofmath.org/wiki/Carmichael_function)</sup> |
| 与 φ 的关系 | λ(n) 整除欧拉函数 φ(n)，因为该群的阶为 φ(n)，而有限群的指数整除其阶<sup>[1](https://encyclopediaofmath.org/wiki/Carmichael_function)</sup> |
| 素数幂 | 对奇素数 p，\( \lambda(p^{a}) = p^{a-1}(p-1) \)；\( \lambda(2) = 1 \)，\( \lambda(4) = 2 \)，对 \( a \ge 3 \)，\( \lambda(2^{a}) = 2^{a-2} \)<sup>[1](https://encyclopediaofmath.org/wiki/Carmichael_function)</sup> |
| 一般公式 | \( \lambda(n) = \mathrm{lcm}\{\lambda(p_i^{a_i})\} \)，其中 \( n = \prod_i p_i^{a_i} \)<sup>[1](https://encyclopediaofmath.org/wiki/Carmichael_function)</sup> |
| 最初几项 | 对 n = 1, 2, 3, ...，依次为 1, 1, 2, 2, 4, 2, 6, 2, 6, 4, 10, ...（OEIS A002322）<sup>[2](https://mathworld.wolfram.com/CarmichaelFunction.html)</sup> |
| RSA 中的应用 | 对 n = pq，\( \lambda(n) = \mathrm{lcm}(p-1, q-1) \)；用 λ 代替 φ 可得到更小的私钥指数<sup>[4](https://www.math.stonybrook.edu/~scott/Book331/RSA_Public_key.html)</sup> |
| 卡迈克尔数 | 满足 λ(n) 整除 n − 1 的合数 n；最小者为 561<sup>[1](https://encyclopediaofmath.org/wiki/Carmichael_function)</sup><sup> • </sup><sup>[5](https://math.mit.edu/~goemans/18310S15/RSA-notes.pdf)</sup> |

## 定义与基本性质

模 n 的单位，即与 n 互素的剩余类，在乘法下构成一个阶为 φ(n) 的有限群，其中 φ 是欧拉函数。卡迈克尔函数就是这个群的指数，即湮灭每个元素的最小正整数：对所有单位 a 都有 \( a^{\lambda(n)} \equiv 1 \pmod{n} \)，且没有更小的正整数指数能做到这一点。<sup>[1](https://encyclopediaofmath.org/wiki/Carmichael_function)</sup> 等价地，λ(n) 是模 n 的所有单位的乘法阶中的最大值，也是 \( (\mathbb{Z}/n\mathbb{Z})^{\times} \) 的最大循环子群的阶。<sup>[6](https://www.mdpi.com/2227-7390/9/15/1800)</sup> 对 n = 1，单位群是平凡群，λ(1) = 1。<sup>[7](https://alphabetamath.cc/item/def-carmichael-function)</sup>

由于有限群的指数整除群的阶，λ(n) 总是整除 φ(n)。<sup>[1](https://encyclopediaofmath.org/wiki/Carmichael_function)</sup> 当且仅当模 n 的原根存在时，这两个函数相等；卡迈克尔本人的教科书论述表明，这仅在 n 为素数幂或奇素数幂的两倍时发生。<sup>[8](https://www.math.utoledo.edu/~codenth/Spring_13/3200/NT-books/The_Theory_of_Numbers-Carmichael.pdf)</sup> 在所有其他情形下，λ(n) 是 φ(n) 的真因子。标准例子是 n = 8：φ(8) = 4，但模 8 的每个单位的平方都等于 1，所以 λ(8) = 2。<sup>[7](https://alphabetamath.cc/item/def-carmichael-function)</sup>

## 由素因数分解计算

中国剩余定理将模 n 的单位群分解为模 n 的各素数幂因子的单位群的直积，而直积的指数等于各因子指数的最小公倍数。这给出了实用公式：<sup>[1](https://encyclopediaofmath.org/wiki/Carmichael_function)</sup>

\[ \lambda(n) = \mathrm{lcm}\{\lambda(p_1^{a_1}), \ldots, \lambda(p_v^{a_v})\} \quad \text{其中 } n = p_1^{a_1} \cdots p_v^{a_v}. \]

素数幂处的取值来自单位群的结构。对奇素数幂 \( p^{a} \)，单位群是循环群，所以 \( \lambda(p^{a}) = \phi(p^{a}) = p^{a-1}(p-1) \)。<sup>[1](https://encyclopediaofmath.org/wiki/Carmichael_function)</sup> 对 2 的幂，群仅在 2 和 4 时是循环的；\( \lambda(2) = 1 \)，\( \lambda(4) = 2 \)，而对 \( a \ge 3 \)，\( \lambda(2^{a}) = 2^{a-2} \)，这是 φ(2^a) 的一半。<sup>[1](https://encyclopediaofmath.org/wiki/Carmichael_function)</sup><sup> • </sup><sup>[9](https://math.dartmouth.edu/~carlp/PDF/lambda030205.pdf)</sup>

例如，取 n = 561 = 3 · 11 · 17，公式给出 \( \lambda(561) = \mathrm{lcm}(2, 10, 16) = 80 \)，它整除 560 = n − 1；这正是使 561 成为卡迈克尔数的条件。<sup>[5](https://math.mit.edu/~goemans/18310S15/RSA-notes.pdf)</sup>

## 与费马定理及卡迈克尔数的关系

费马小定理指出，对不整除 a 的素数 p，有 \( a^{p-1} \equiv 1 \pmod{p} \)；欧拉定理将其推广为：对与 n 互素的 a，有 \( a^{\phi(n)} \equiv 1 \pmod{n} \)。卡迈克尔函数精化了这两个结果：它是统一适用于所有单位的最小指数，因此 \( a^{\lambda(n)} \equiv 1 \pmod{n} \) 中的指数可以远小于 φ(n)。<sup>[10](https://www.ejpam.com/index.php/ejpam/article/view/3182/585)</sup> 对每个单独的 a，a 模 n 的乘法阶同时整除 φ(n) 和 λ(n)。<sup>[8](https://www.math.utoledo.edu/~codenth/Spring_13/3200/NT-books/The_Theory_of_Numbers-Carmichael.pdf)</sup>

若合数 n 使得对所有与 n 互素的 a 都有 \( a^{n-1} \equiv 1 \pmod{n} \)，则称 n 为卡迈克尔数；这类数能骗过所有与 n 互素的底数的费马素性检验。<sup>[5](https://math.mit.edu/~goemans/18310S15/RSA-notes.pdf)</sup> 用卡迈克尔函数的语言来说，合数 n 是卡迈克尔数，当且仅当 λ(n) 整除 n − 1。<sup>[1](https://encyclopediaofmath.org/wiki/Carmichael_function)</sup> 卡迈克尔在 1910 年发现了第一个例子 561 = 3 · 11 · 17，而是否存在无穷多个卡迈克尔数这一问题一直悬而未决，直到 W·R·奥尔福德（W. R. Alford）、安德鲁·格兰维尔（Andrew Granville）和卡尔·波梅兰斯（Carl Pomerance）于 1994 年证明了这样的数有无穷多个。<sup>[11](https://mathshistory.st-andrews.ac.uk/Biographies//Carmichael/)</sup> 它们很稀少：10000 以下只有 22 个。<sup>[5](https://math.mit.edu/~goemans/18310S15/RSA-notes.pdf)</sup>

## 在 RSA 密码学中的应用

在 RSA 密码系统中，私钥解密指数经典地描述为公钥指数 e 模 φ(n) 的逆元。也可以改为模 λ(n) 计算，这是有效的，因为 λ(n) 整除 φ(n)，而 \( m^{ed} \equiv m \pmod{n} \) 已可由较小的指数推出。<sup>[4](https://www.math.stonybrook.edu/~scott/Book331/RSA_Public_key.html)</sup> 对于由两个素数 p 和 q 之积构成的模数 n，

\[ \lambda(n) = \mathrm{lcm}(p-1, q-1). \]

由于 p − 1 和 q − 1 总是偶数，这个最小公倍数通常小于 (p − 1)(q − 1)，因此所得的私钥指数更小，解密更快。<sup>[4](https://www.math.stonybrook.edu/~scott/Book331/RSA_Public_key.html)</sup> 近期关于多素数、多幂次 RSA 推广的工作也依赖于用 λ 刻画模 n 的正规数。<sup>[12](https://monami.hs-mittweida.de/files/16391/6_NG_Sci_Rev_4_Lange-Geisler.pdf)</sup>

## 解析行为

λ(n) 的定量行为由保罗·埃尔德什（Paul Erdős，匈牙利科学院）、卡尔·波梅兰斯（Carl Pomerance，达特茅斯学院）和埃里克·施穆茨（Eric Schmutz）在他们 1991 年发表于《算术学报》的论文《卡迈克尔的 λ 函数》中研究，他们考察了其平均阶、正规阶和最小阶。他们证明了在渐近密度为 1 的整数集合上，

\[ \lambda(n) = \frac{n}{(\log n)^{\log\log\log n + 4 + O((\log\log\log n)^{-1+\varepsilon})}}, \]

因此 λ(n) 通常略小于 n，但远大于 log n 的任何固定幂；他们还给出了最小阶的界，证明沿任何递增序列，最终有 \( \lambda(n_i) > (\log n_i)^{c_0 \log\log\log n_i} \) 对任意 \( c_0 < 1/\log 2 \) 成立，并对某个常数 \( c_1 \) 给出了匹配的上界序列。

**值的分布。** 凯文·福特（Kevin Ford）、弗洛里安·卢卡（Florian Luca）和卡尔·波梅兰斯证明，λ 所取值集合的计数函数为 \( x/(\log x)^{\eta + o(1)} \)，其中 \( \eta = 1 - (1 + \log\log 2)/\log 2 = 0.08607\ldots \)；因此 λ 的像在整数中是稀疏的。<sup>[13](https://arxiv.org/abs/1408.6506)</sup> 佐治亚大学数论学家保罗·波拉克（Paul Pollack）于 2023 年证明，当 q 为奇数时，随着 n 变化，模 q 的每个互素剩余类被 λ(n) 命中的频率相同，且 λ(n) 关于自然密度服从本福特定律。<sup>[14](https://arxiv.org/abs/2303.14043)</sup>

**迭代与伪随机性。** 该函数还控制伪随机数生成器。对幂生成器 \( f(x) = x^{\ell} \pmod{n} \)（其 \( \ell = 2 \) 的情形即 Blum–Blum–Shub 生成器），周期以 λ(λ(n)) 为上界。格雷格·马丁（Greg Martin）和卡尔·波梅兰斯证明，对几乎所有 n，

\[ \lambda(\lambda(n)) = \frac{n}{\exp((1 + o(1))(\log\log n)^{2} \log\log\log n)}, \]

并由此推出，对几乎所有 n，该生成器至少有 \( \exp((1 + o(1))(\log\log n)^{2} \log\log\log n) \) 个不相交的循环；他们证明在库默尔域的广义黎曼假设下这个界是精确的。<sup>[9](https://math.dartmouth.edu/~carlp/PDF/lambda030205.pdf)</sup>

## 相关猜想

另一个同样以卡迈克尔命名的猜想涉及的是欧拉函数而非 λ：它断言，若对某个 m 有 φ(x) = m，则存在 y ≠ x 使 φ(y) = m，也就是说，欧拉函数的任何取值都不会恰好被取到一次。卡迈克尔在 1907 年发表了一个错误的证明，随后撤回，并在其 1922 年的论文《关于欧拉 φ 函数的注记》中把该问题重新表述为猜想；该猜想至今仍未解决。<sup>[11](https://mathshistory.st-andrews.ac.uk/Biographies//Carmichael/)</sup>

## References

1. [Carmichael function, Encyclopedia of Mathematics](https://encyclopediaofmath.org/wiki/Carmichael_function)
2. [Eric W. Weisstein, "Carmichael Function," Wolfram MathWorld](https://mathworld.wolfram.com/CarmichaelFunction.html)
3. [R. D. Carmichael, "Note on a New Number Theory Function," Bulletin of the American Mathematical Society 16 (5), 1910, pp. 232–238, reference entry](https://www.scirp.org/reference/referencespapers?referenceid=546939)
4. [Scott, "The RSA Public Key Cryptosystem," Stony Brook University](https://www.math.stonybrook.edu/~scott/Book331/RSA_Public_key.html)
5. [Goemans, "18.310 Lecture Notes: RSA," MIT](https://math.mit.edu/~goemans/18310S15/RSA-notes.pdf)
6. ["Revisited Carmichael's Reduced Totient Function," Mathematics (MDPI) 9 (15), 2021](https://www.mdpi.com/2227-7390/9/15/1800)
7. ["Carmichael's function λ(n) as the exponent of (Z/nZ)×," Alphabeta Math](https://alphabetamath.cc/item/def-carmichael-function)
8. [R. D. Carmichael, *The Theory of Numbers* (1914), scanned text](https://www.math.utoledo.edu/~codenth/Spring_13/3200/NT-books/The_Theory_of_Numbers-Carmichael.pdf)
9. [Greg Martin and Carl Pomerance, "The iterated Carmichael λ-function and the number of cycles of the power generator," arXiv:math/0406335](https://math.dartmouth.edu/~carlp/PDF/lambda030205.pdf)
10. ["European Journal of Pure and Applied Mathematics," article 3182](https://www.ejpam.com/index.php/ejpam/article/view/3182/585)
11. ["Robert Carmichael (1879–1967)," MacTutor History of Mathematics](https://mathshistory.st-andrews.ac.uk/Biographies//Carmichael/)
12. [Lange and Geisler, multi-prime multi-power RSA and Carmichael's theorem](https://monami.hs-mittweida.de/files/16391/6_NG_Sci_Rev_4_Lange-Geisler.pdf)
13. [Kevin Ford, Florian Luca, and Carl Pomerance, "The image of Carmichael's λ-function," arXiv:1408.6506](https://arxiv.org/abs/1408.6506)
14. [Paul Pollack, "Two problems on the distribution of Carmichael's lambda function," arXiv:2303.14043](https://arxiv.org/abs/2303.14043)

---
*Initially written Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 数与代数 › Number theory › Elementary number theory › Orders, primitive roots, and the multiplicative group mod n

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/carmichael-function

English original: https://www.edgepedia.org/carmichael-function
