# 完全幂

完全幂是指可以写成 \( m^{k} \) 的正整数，其中 \( m > 1 \) 是正整数，\( k \geq 2 \)；平方数 4、9、16、25 和立方数 8、27、64 是最小的例子<sup>[1](https://mathworld.wolfram.com/PerfectPower.html)</sup>。同一个数可能由多种表示产生，而判断任意整数是否为完全幂，是素性检验和整数分解中的标准子程序<sup>[2](https://www.maths.ox.ac.uk/node/21580)</sup>。

| 关键事实 | 细节 |
|---|---|
| 定义 | \( n = m^{k} \)，其中 \( m > 1 \) 为整数，\( k \geq 2 \)<sup>[1](https://mathworld.wolfram.com/PerfectPower.html)</sup> |
| 素因数分解检验 | 若 \( n = p_1^{a_1} p_2^{a_2} \cdots p_k^{a_k} \)，则 \( n \) 是完全幂当且仅当 \( \gcd(a_1, a_2, \ldots, a_k) > 1 \)<sup>[1](https://mathworld.wolfram.com/PerfectPower.html)</sup> |
| 前几个不同取值 | 1, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 81, 100, 121, 125, 128（整数序列在线百科全书 A001597）<sup>[3](https://www.m-hikari.com/imf/imf-2013/9-12-2013/jakimczukIMF9-12-2013.pdf)</sup> |
| 增长 | 第 \( n \) 个完全幂满足 \( P_n \sim n^2 \)，因为仅平方数就在每个整数平方附近提供一个完全幂<sup>[3](https://www.m-hikari.com/imf/imf-2013/9-12-2013/jakimczukIMF9-12-2013.pdf)</sup> |
| 倒数和 | 哥德巴赫证明了 \( \sum_{i \geq 2} \sum_{j \geq 2} 1/i^{j} = 1 \)，即完全幂的倒数之和（按重复计数）<sup>[4](https://oeis.org/A001597)</sup> |
| 检测代价 | 对 \( k \) 位整数的二分查找检验需要 \( O(k^{3} \log k) \) 次位运算；更快的方法可达到 \( (\lg b)^{O(1)} \)，其中 \( b = \lg n \)<sup>[5](https://shoup.net/ntb/ntb-b1.pdf)</sup><sup> • </sup><sup>[2](https://www.maths.ox.ac.uk/node/21580)</sup> |
| 算法中的作用 | 完全幂检验是 阿格拉沃尔–卡亚尔–萨克塞纳素性检验和数域筛法的第一步，偶尔也是瓶颈<sup>[2](https://www.maths.ox.ac.uk/node/21580)</sup> |

## 刻画

定义允许两种等价的描述。直接描述是表示式 \( n = m^{k} \)。结构描述则读取素因数分解：写作 \( n = p_1^{a_1} p_2^{a_2} \cdots p_k^{a_k} \)，数 \( n \) 是完全幂，当且仅当指数 \( a_1, \ldots, a_k \) 的最大公约数大于 1<sup>[1](https://mathworld.wolfram.com/PerfectPower.html)</sup>。例如，\( 2^{6} \cdot 3^{6} = 729 \cdot 64 \) 的指数最大公约数为 6，所以它是六次幂；而 \( 2^{3} \cdot 3^{2} = 72 \) 的指数最大公约数为 1，因此不是完全幂。

每个表示 \( n = m^{k} \) 根据 \( k \) 的奇偶性，称为偶次幂或奇次幂，有些数两者兼具：\( 64 = 2^{6} = 4^{3} \)<sup>[1](https://mathworld.wolfram.com/PerfectPower.html)</sup>。这种重叠是普遍现象，因为当 \( k \) 为合数时，一个 \( k \) 次幂自动也是 \( p \) 次幂，其中 \( p \) 可以是整除 \( k \) 的任意素数；这正是寻找表示时只需检验素指数的规则的依据<sup>[6](https://kevos.com/pages/integer-square-root-and-perfect-power-detection.html)</sup>。

## 序列及其计数函数

按顺序列出不同的完全幂，得到整数序列在线百科全书中的序列 A001597，开头为 1, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 81, 100, 121, 125, 128<sup>[3](https://www.m-hikari.com/imf/imf-2013/9-12-2013/jakimczukIMF9-12-2013.pdf)</sup>。如果保留重复，即每个不超过截断值的底数贡献其所有幂，则列表开头为 4, 8, 9, 16, 16, 25, 27, 32, 36, 49, 64, 64, 64，其中 16 出现两次，因为 \( 16 = 2^{4} = 4^{2} \)；64 出现三次（整数序列在线百科全书 A072103）<sup>[1](https://mathworld.wolfram.com/PerfectPower.html)</sup>。

**密度。** 平方数主导该序列。计数函数 \( N(x) \)，即不超过 \( x \) 的完全幂的个数，满足 \( N(x) \sim \sqrt{x} \)，而第 \( n \) 个完全幂满足 \( P_n \sim n^{2} \)；卢汉国立大学的拉斐尔·雅基姆丘克（Rafael Jakimczuk）在 2012 年将其精细化为一个展开式，开头为 \( P_n = n^{2} - 2n^{5/3} - 2n^{7/5} + (13/3)n^{4/3} + \cdots \)<sup>[3](https://www.m-hikari.com/imf/imf-2013/9-12-2013/jakimczukIMF9-12-2013.pdf)</sup>。计算出的计数证实了向平方根规律的逼近：不超过 \( 10^{2} \) 有 13 个完全幂，不超过 \( 10^{4} \) 有 6,400 个，不超过 \( 10^{6} \) 有 804,357 个，不超过 \( 10^{8} \) 有 90,706,576 个，因此随着 \( x \) 增大，完全幂在整数中所占比例向 1 攀升，而计数本身仍保持在 \( \sqrt{x} \) 的量级<sup>[4](https://oeis.org/A001597)</sup>。

**倒数和。** 哥德巴赫证明了完全幂的倒数和（按重复计数）收敛，并且实际上恰好等于 1：\( \sum_{i \geq 2} \sum_{j \geq 2} 1/i^{j} = 1 \)<sup>[1](https://mathworld.wolfram.com/PerfectPower.html)</sup><sup> • </sup><sup>[4](https://oeis.org/A001597)</sup>。A001597 上记录的相关恒等式包括 \( \sum_{k \geq 2} 1/(a(k)+1) = \pi^{2}/3 - 5/2 \) 和 \( \sum_{k \geq 2} 1/a(k) \approx 0.8744643684 \)<sup>[4](https://oeis.org/A001597)</sup>。

## 关于完全幂的丢番图问题

若干经典问题询问完全幂之间能相隔多远，或者它们之间的方程能否成立。

**卡塔兰猜想。** 大于 1 的唯一一对连续完全幂是 8 和 9，即 \( 3^{2} \) 和 \( 2^{3} \)。欧仁·夏尔·卡塔兰（Eugene Charles Catalan）在 1844 年提出此猜想，普雷达·米哈伊列斯库（Preda Mihăilescu）于 2004 年利用分圆域完全证明了它<sup>[7](https://www.ams.org/bull/2004-41-01/S0273-0979-03-00993-5/S0273-0979-03-00993-5.pdf)</sup>。它是皮莱问题中 \( c = 1 \) 的情形<sup>[8](https://link.springer.com/article/10.1007/s00605-024-01981-z)</sup>。

**皮莱问题。** S. S. 皮莱（S. S. Pillai）问：对每个固定整数 \( c \geq 1 \)，方程 \( a^{x} - b^{y} = c \)（其中 \( \min\{x, y\} \geq 2 \)）是否只有有限多个正整数解；一般问题仍未解决，特殊情况则用代数数的对数的线性形式来攻克<sup>[8](https://link.springer.com/article/10.1007/s00605-024-01981-z)</sup>。一个相关的早期结果由 A. 马科夫斯基（A. Makowski）于 1962 年和 S. 希罗（S. Hyrö）于 1964 年给出：完全幂序列中不存在三个连续完全幂<sup>[9](https://webusers.imj-prg.fr/~michel.waldschmidt/articles/pdf/PerfectPowers.pdf)</sup>。

**比尔猜想。** 方程 \( x^{p} + y^{q} = z^{r} \)（所有指数至少为 2）是达尔蒙（Darmon）和格兰维尔（Granville）的费马–卡塔兰猜想的主题，他们证明了在条件 \( 1/p + 1/q + 1/r < 1 \) 下只有有限多个互素解。目前已知只有 10 个这样的解，而在每一个解中，\( p, q, r \) 至少有一个等于 2；这促使理查德·蒂德曼（Richard Tijdeman）、唐·扎吉尔（Don Zagier）和安德鲁·比尔（Andrew Beal）猜想：不存在三个指数都至少为 3 的解<sup>[9](https://webusers.imj-prg.fr/~michel.waldschmidt/articles/pdf/PerfectPowers.pdf)</sup>。

完全幂也作为目标出现在其他序列中。一篇 2026 年的论文证明，在雅各布斯塔尔数（一种卢卡斯型递推）中，唯一的完全幂是平凡值 0 和 1，从而将问题归结为一个三元指数丢番图方程<sup>[10](https://arxiv.org/abs/2605.31114)</sup>。

## 检测完全幂

给定整数 \( n \geq 2 \)，判定问题是确定是否存在整数 \( d, e > 1 \) 使得 \( n = d^{e} \)<sup>[5](https://shoup.net/ntb/ntb-b1.pdf)</sup>。直接方法限制搜索范围：由于 \( 2^{e} \leq n \)，候选指数 \( e \) 只从 2 到 \( \lfloor \log_{2} n \rfloor \)<sup>[5](https://shoup.net/ntb/ntb-b1.pdf)</sup>。对每个候选值，整数 \( e \) 次根（如果存在）位于一个短区间内，可以通过二分查找来搜索，每一步比较 \( w^{e} \) 与 \( n \)；对 \( k \) 位数的总代价是 \( O(k^{3} \log k) \) 次位运算<sup>[5](https://shoup.net/ntb/ntb-b1.pdf)</sup>。两项改进进一步减少了工作量：只需检验素指数；并且如果已经找到 \( n \) 的一个重数为 \( e \) 的素因子 \( p \)，则只有指数整除 \( e \) 的根才有可能是整数<sup>[6](https://kevos.com/pages/integer-square-root-and-perfect-power-detection.html)</sup><sup> • </sup><sup>[11](https://gmplib.org/manual/Perfect-Power-Algorithm.html)</sup>。

存在更快的渐近方法。当时在加州大学伯克利分校的数学家和计算机科学家丹尼尔·J. 伯恩斯坦（Daniel J. Bernstein）于 1998 年发表了一个本质上是线性时间的检测算法；后来伯恩斯坦、亨德里克·伦斯特拉（Hendrik Lenstra）和乔纳森·皮拉（Jonathan Pila）给出了一个算法，能在 \( (\lg b)^{O(1)} \)（其中 \( b = \lg n \)）时间内找到使 \( n \) 为 \( k \) 次幂的最大 \( k \)，取代了先前依赖超越数论的证明<sup>[2](https://www.maths.ox.ac.uk/node/21580)</sup>。实际应用中的程序库实现的是更简单的变体：GMP 的 `mpz_perfect_power_p` 使用重复的 \( n \) 次根提取，只考虑次数为素数的根，并利用找到的任何小素因子来限制候选指数<sup>[11](https://gmplib.org/manual/Perfect-Power-Algorithm.html)</sup>。

## 在分解与素性检验中的作用

完全幂检验是那些主任务更难的算法中廉价的第一步。在用数域筛法尝试分解 \( n \) 之前，应当检查 \( n \) 不是完全幂，或者至少不是素数幂，因为肯定的答案已经提供了分解<sup>[12](https://cr.yp.to/papers/powers-ams.pdf)</sup>。同样的检查是 阿格拉沃尔–卡亚尔–萨克塞纳素性检验的第一步，偶尔也是瓶颈<sup>[2](https://www.maths.ox.ac.uk/node/21580)</sup>。将完全幂检验与高效素性检验结合，还能判定 \( n \) 是否为素数幂 \( p^{e} \)：找到使 \( n = d^{e} \) 的最大 \( e \)，然后检验 \( d \) 是否为素数<sup>[5](https://shoup.net/ntb/ntb-b1.pdf)</sup>。

## References

1. [Perfect Power, Wolfram MathWorld](https://mathworld.wolfram.com/PerfectPower.html)
2. [Detecting perfect powers by factoring into coprimes, D. J. Bernstein, H. W. Lenstra, J. Pila, Mathematics of Computation 76 (2007), Oxford Mathematical Institute page](https://www.maths.ox.ac.uk/node/21580)
3. [Rafael Jakimczuk (2013), Exact Formulae for the Perfect Power Counting Function and the n-th Perfect Power, International Mathematical Forum 8(11), 513–516](https://www.m-hikari.com/imf/imf-2013/9-12-2013/jakimczukIMF9-12-2013.pdf)
4. [OEIS A001597: Perfect powers](https://oeis.org/A001597)
5. [Victor Shoup, A Computational Introduction to Number Theory and Algebra, §10.5 Perfect Power Testing and Prime Power Factoring](https://shoup.net/ntb/ntb-b1.pdf)
6. [KEVOS: Integer Square Root and Perfect Power Detection](https://kevos.com/pages/integer-square-root-and-perfect-power-detection.html)
7. [Tauno Metsänkylä (2004), Catalan's Conjecture: another old Diophantine problem solved, Bulletin of the AMS 41(1), 43–57](https://www.ams.org/bull/2004-41-01/S0273-0979-03-00993-5/S0273-0979-03-00993-5.pdf)
8. [Faye, García, Gomez (2024), k-Generalized Lucas numbers, perfect powers and the problem of Pillai, Monatshefte für Mathematik 204, 839–885](https://link.springer.com/article/10.1007/s00605-024-01981-z)
9. [Collected Works of S. S. Pillai, annotated by Michel Waldschmidt](https://webusers.imj-prg.fr/~michel.waldschmidt/articles/pdf/PerfectPowers.pdf)
10. [Perfect powers among Jacobsthal numbers, arXiv:2605.31114](https://arxiv.org/abs/2605.31114)
11. [GNU MP 6.3.0 manual, §15.5.4 Perfect Power Algorithm](https://gmplib.org/manual/Perfect-Power-Algorithm.html)
12. [Daniel J. Bernstein, Detecting perfect powers in essentially linear time (Mathematics of Computation preprint)](https://cr.yp.to/papers/powers-ams.pdf)

---
*Initially written Oct 15, 2026 · Edited: Oct 25, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 数与代数 › Arithmetic and number systems › Integer sequences and partitions › Special and named integers › Powers and perfect powers

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/perfect-power

English original: https://www.edgepedia.org/perfect-power
