Intermediate

完全数计算器

输入正整数,查看其真因数之和,并判断它是完全数、盈数还是亏数。
A positive integer
Sum of proper divisors
28

完全 — aliquot sum 28 vs 28

Number n
28
Sum of proper divisors
28
Classification
完全
Abundance (s - n)
0
Proper divisors
1, 2, 4, 7, 14
4%
7%
14%
25%
50%
1
2
4
7
14
Proper divisors — bars proportional to divisor size
Step by step
  1. 1

    Trial division bound √n

    √28 = 5.29
    Check every i from 2 up to this bound; each divisor i pairs with n ÷ i
  2. 2

    Sum of proper divisors

    1 + 2 + 4 + 7 + 14 = 28
结果仅为一般参考性的估算,并非专业建议——在依赖这些重要结果之前,请务必自行独立核实。 阅读完整免责声明.
快速解答

这个计算器是如何工作的?

当一个数的真因数之和等于本身时,它是完全数;之和更大时为盈数;更小时为亏数。输入任意正整数,本计算器列出因数、报告因数和 s,并对该数进行分类,同时显示盈余 s − n。

公式
s = n 的真因数之和;若 s = n 则为完全数,若 s > n 则为盈数,若 s < n 则为亏数
How this is calculated

输入 n 必须为正整数。计算器找出 n 的所有真因数——即所有正因数(n 本身除外)——并将它们相加。此总和称为因数和,记作 s。

为高效找到因数,循环 i 从 1 到 floor(sqrt(n))。每当 n 能被 i 整除时,i 和配对因数 n/i 均为因数,两者都被加入(注意当 n 为完全平方数时,平方根只计一次,例如 n = 16 时因数 4 只计一次)。n 本身被排除,因为我们只求真因数之和。

然后将 s 与 n 比较来分类:当 s = n 时为完全数(例如 6 = 1 + 2 + 3,28 = 1 + 2 + 4 + 7 + 14),当 s > n 时为盈数(如 12),当 s < n 时为亏数(如 8,以及每个质数,其唯一真因数为 1)。盈余 s − n 衡量该数距完全数的远近:完全数为零,盈数为正,亏数为负。按惯例,n = 1 没有真因数,故 s = 0,为亏数。

常见问题

完全数等于其所有真因数(所有正因数除本身外)之和。最小的例子是 6、28、496 和 8128。

盈数的因数和大于该数本身(如 12),而亏数的因数和小于该数本身(如 8 以及所有质数)。

因数和是一个数所有真因数之和。将其与数本身比较,可确定该数是完全数、盈数还是亏数。

也称为

完全数
完美数
完全数判断
盈数亏数
真因子和
完全数检测

APA

TG we-Calculate Editorial Team. (2026). 完全数计算器 [Online calculator]. TG we-Calculate. https://we-calculate.com/zh/calculator/perfect-number-checker

Chicago

TG we-Calculate Editorial Team. "完全数计算器." TG we-Calculate. 2026. https://we-calculate.com/zh/calculator/perfect-number-checker.

IEEE

TG we-Calculate Editorial Team, "完全数计算器," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/zh/calculator/perfect-number-checker

BibTeX

@misc{wecalculate_perfect_number_checker, title = {完全数计算器}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/zh/calculator/perfect-number-checker}}, year = {2026}, note = {TG we-Calculate} }

这个计算器对您有帮助吗?