Semiperfect Number Calculator
Check whether some subset of the proper divisors of n adds exactly to n.
What it does
A semiperfect number, also called a pseudoperfect number, is an integer that equals the sum of some subset of its proper divisors. The number 6 is the first example, since 1 + 2 + 3 = 6. The next is 12, where 2 + 4 + 6 = 12 among other combinations.
Every perfect number is semiperfect, because the whole set of proper divisors already sums to the number. Every abundant number whose divisors can be combined suitably is also semiperfect, but not all abundant numbers are, which leads to the weird numbers.
Testing the property means solving a subset sum problem over the proper divisors. This page uses a dynamic programming table of reachable sums, so the answer is exact rather than a guess from a few combinations.
The tool reports the sum and count of proper divisors alongside the verdict. The divisor sum being at least n is a necessary condition, and the subset sum test then decides the question.
The input limit is one thousand, which keeps the dynamic programming table small and the answer immediate.
How to use
- Enter a whole number n from 1 to 1,000.
- Read the classification in the main result box.
- Check the sum of proper divisors beside it.
- Use the divisor count to see how many options the subset search had.
- The default n = 12 reproduces the worked example.
- Try n = 70 to see an abundant number that is not semiperfect.
Formula
- n
- The integer being tested.
- S
- A subset of the proper divisors of n.
- sum(S)
- The total of the chosen divisors.
The dynamic programming table marks which sums are reachable using the divisors processed so far. Each divisor is used at most once, and the table is updated from high sums down to avoid double counting. The sum of all proper divisors gives an early necessary check.
Worked example
Example: n = 12
The page opens with n = 12.
- List the proper divisors of 12: 1, 2, 3, 4 and 6.
- Add them: the total is 16, which is at least 12.
- Search combinations and find 2 + 4 + 6 = 12.
- Another valid combination is 1 + 2 + 3 + 6 = 12.
- The tool reports Semiperfect, divisor sum 16 and divisor count 5.
- For 70 the divisors are abundant but no subset sums to 70.
Reference table
| n | Proper divisor sum | Semiperfect | Note |
|---|---|---|---|
| 6 | 6 | Yes | Perfect |
| 12 | 16 | Yes | 2 + 4 + 6 |
| 18 | 21 | Yes | 3 + 6 + 9 |
| 20 | 22 | Yes | 2 + 8 + 10 |
| 70 | 74 | No | Abundant but weird |
Limits
- Inputs above 1,000 are rejected to keep the subset sum table small.
- Only proper divisors are eligible for the subset.
- The tool reports a verdict, not the actual subset that works.
- Each divisor may be used at most once.
Common mistakes
- Including n itself in the eligible divisors.
- Allowing a divisor to be used more than once.
- Assuming every abundant number is semiperfect.
- Confusing this with practical numbers, which represent every smaller integer.
- Assuming the divisor sum must equal n exactly.
Try it yourself
Quick checks. Answers sit tucked under each question.
Is 12 semiperfect?
Yes, because 2 + 4 + 6 = 12.
Is 6 semiperfect?
Yes, because 1 + 2 + 3 = 6, so it is also perfect.
Is 70 semiperfect?
No. It is abundant but no subset of its proper divisors sums to 70.
Questions
What does pseudoperfect mean?
It is another name for semiperfect.
Are all perfect numbers semiperfect?
Yes, since all proper divisors together already sum to the number.
Are all abundant numbers semiperfect?
No. Those that are not are called weird numbers.
How is the test done?
A subset sum table tracks which totals can be reached.
Are results exact?
Yes. Integer arithmetic is used.
What input range is accepted?
Whole numbers from 1 through 1,000.