How to Use
Enter a number:
- Test: Semiperfect?
- Subset: Which divisors sum to n
- Weird: Abundant but not semiperfect?
Weird Numbers
70 is the smallest weird number: abundant (σ(70)=144>140) but no subset of {1,2,5,7,10,14,35} sums to 70. The next weird numbers: 836, 4030, 5830, 7192, 7912... They're all even — no odd weird numbers are known!
Algorithm
This is a subset sum problem — NP-complete in general, but for the specific case of divisors of n, the number of divisors is O(n^ε), making it tractable for reasonable n using dynamic programming.
Step-by-Step Instructions
- 1Enter number.
- 2Find divisors.
- 3Check subset sum.
- 4Show solution.
- 5Classify weird.