Weird Number Calculator
Number
- A weird number is abundant - its proper divisors sum to more than the number - yet no subset of those divisors sums exactly to the number itself (it is not semiperfect).
- The proper divisors of 70 are 1, 2, 5, 7, 10, 14, 35, summing to 74, so 70 is abundant.
- A subset-sum search over the divisors finds no subset totalling 70.
- No subset of its proper divisors sums to 70, so 70 is weird - abundant, yet not semiperfect.
This weird number calculator tells you whether a whole number is weird. A weird number is abundant — its proper divisors sum to more than the number — but no subset of those divisors sums exactly to the number. The calculator adds up the proper divisors and then checks every subset of them. If the sum is greater than the number and no subset reaches it exactly, the number is weird. If a subset does add up to the number, the number is semiperfect, not weird. The smallest weird number is 70: its proper divisors sum to 74, yet no subset of them makes 70. For contrast, 12 is abundant (divisor sum 16) but not weird, because a subset of its divisors sums to 12 — it is semiperfect. The number 20 is abundant too (divisor sum 22) but semiperfect, so it is not weird either. Weird numbers are rare, and it is unknown whether any odd weird number exists.
The method behind this page is the accepted standard for this kind of calculation because it follows the definition directly: sum the proper divisors, then test subsets for an exact match to the number. That is exactly what separates weird numbers from other abundant numbers, so the answer rests on the definition itself rather than on a shortcut or a guess. To make the result easy to check, this page shows the formula, the step-by-step workings, worked examples and sources. You can follow each stage — the divisor sum, the subset search and the final classification — and compare the output with the examples given here.
Worked examples
70, the smallest weird number
(70)
| Weird number verdict | Yes |
| Sum of proper divisors | 74 |
| Semiperfect (some subset sums to n) | No |
| Classification by divisor sum | Abundant |
12, abundant but semiperfect
(12)
| Weird number verdict | No |
| Sum of proper divisors | 16 |
| Semiperfect (some subset sums to n) | Yes |
| Classification by divisor sum | Abundant |
20, abundant but semiperfect
(20)
| Weird number verdict | No |
| Sum of proper divisors | 22 |
| Semiperfect (some subset sums to n) | Yes |
| Classification by divisor sum | Abundant |
What is a weird number?
A weird number is defined by a two-part test, and it has to pass both parts. First, the number must be abundant: its proper divisors — the positive divisors smaller than the number itself — must add up to more than the number. Second, it must fail a stricter condition: no combination of those proper divisors may sum exactly to the number. A number that passes the first test but fails the second is called semiperfect, and semiperfect numbers are not weird. So a weird number is an abundant number that is not semiperfect. That combination is what makes it weird, and it is why a weird number calculator checks both conditions rather than stopping at abundance.
The smallest weird number is 70. Its proper divisors are 1, 2, 5, 7, 10, 14, and 35, and these sum to 74, which is more than 70, so 70 is abundant. Now try to reach exactly 70 by adding some of those divisors. You can get close: 35 + 14 + 10 + 7 + 2 + 1 = 69, and 35 + 14 + 10 + 7 + 5 = 71. But no subset of the divisors sums to 70. Because 70 is abundant and no subset of its divisors makes 70, it is weird.
Contrast that with 12. Its proper divisors are 1, 2, 3, 4, and 6, which sum to 16 — more than 12, so 12 is abundant. But a subset of its divisors does reach 12 exactly: 6 + 4 + 2 = 12. That makes 12 semiperfect, so it is not weird. The number 20 behaves the same way. Its proper divisors are 1, 2, 4, 5, and 10, which sum to 22, so 20 is abundant. Yet 10 + 5 + 4 + 1 = 20, so a subset of its divisors sums to 20. That makes 20 semiperfect as well, and therefore not weird.
These examples show why the second part of the test matters so much. Abundance alone is common, and many abundant numbers turn out to be semiperfect. The weird ones are the abundant numbers where every attempt to build the number from its own divisors falls short or overshoots. This is the check a weird number calculator performs: it first adds the proper divisors to confirm abundance, then examines the possible subset sums to see whether any of them equals the number.
- Weird number: abundant, and no subset of its proper divisors sums to the number.
- 70: proper divisors sum to 74, yet no subset of them makes 70 — the smallest weird number.
- 12: abundant with a divisor sum of 16, but 6 + 4 + 2 = 12, so it is semiperfect and not weird.
- 20: abundant with a divisor sum of 22, but 10 + 5 + 4 + 1 = 20, so it is semiperfect and not weird.
Worked examples
The quickest way to understand a weird number calculator is to run a few numbers through it by hand. The test has two parts: first check whether the number is abundant, then check whether any subset of its proper divisors adds up to the number itself. A number that passes the first test but fails the second is weird. The examples below show both outcomes.
Start with 70, the smallest weird number. Its proper divisors sum to 74, which is more than 70, so 70 is abundant. That alone does not make it weird, because many abundant numbers can be built from their own divisors. For 70, no subset of those divisors sums exactly to 70. It clears the abundance test and fails the subset test, so it is weird. This is the result a weird number calculator should return for 70, and it is why 70 is the standard first example in any discussion of these numbers.
Now compare 12. Its proper divisors sum to 16, so 12 is abundant, just like 70. But 12 is not weird, because some subset of its divisors does sum to 12. A number with that property is called semiperfect, and semiperfect numbers are never weird. The abundance is real, but the subset test succeeds, so the weird test fails.
The number 20 behaves the same way. Its proper divisors sum to 22, so it is abundant. Yet a subset of its divisors sums to 20, making 20 semiperfect and therefore not weird. Put 12 and 20 side by side with 70 and the distinction is clear: all three are abundant, but only 70 has no subset of divisors that reaches the number. The difference is not the size of the divisor sum but whether the target can be hit exactly.
These examples also show why weird numbers are rare. Abundance is common enough, but the extra requirement, that no subset of divisors reaches the number, rules out most abundant numbers. It is also unknown whether any odd weird number exists, so every weird number found so far is even. Running a few familiar numbers through the weird number calculator is a good way to see the two-step test in action before trusting it on larger inputs.
| Number | Proper divisor sum | Abundant? | Subset sums to the number? | Result |
|---|---|---|---|---|
| 70 | 74 | Yes | No | Weird |
| 12 | 16 | Yes | Yes | Semiperfect, not weird |
| 20 | 22 | Yes | Yes | Semiperfect, not weird |
The subset-sum search
A weird number is abundant — its proper divisors sum to more than the number — but no subset of those divisors sums exactly to the number. That second condition is the hard part. To prove a number is weird, you have to show that every possible combination of its proper divisors misses the target. To prove it is not weird, you only need one combination that hits it. This is the subset-sum problem in miniature, and it is why a weird number calculator cannot rely on the divisor sum alone.
The divisor sum tells you only whether a number is abundant. It says nothing about which subsets are possible. Consider 12: its proper divisors sum to 16, so it is abundant, but a subset of its divisors (6 + 4 + 2) sums to 12. That makes 12 semiperfect, and semiperfect numbers are not weird. The number 20 behaves the same way — its proper divisors sum to 22, and some subset of them reaches 20 exactly, so 20 is semiperfect too. In both cases the abundance test passes, yet the number fails the subset test. Two numbers can have similar divisor sums and land on opposite sides of the weird line.
Checking all subsets by brute force gets expensive quickly. A number with k proper divisors has 2^k subsets, so the count doubles with every new divisor. That is fine for small numbers but impractical for larger ones. Instead, the calculator uses a bitset dynamic program. It keeps a compact record of every sum reachable so far, then folds in each divisor one at a time, shifting the reachable set by that divisor and merging it with the old set. After processing all divisors, the calculator simply checks whether the bit for the number itself is set. If it is, some subset hits the target and the number is not weird; if it is not, the number is weird.
The smallest example is 70. Its proper divisors sum to 74, which is more than 70, so it is abundant. Yet no subset of those divisors sums to exactly 70, so 70 is the smallest weird number. The bitset search confirms this by exhausting every reachable sum and finding 70 absent.
Because both conditions must hold at once, weird numbers are rare. The subset-sum search is what separates them from ordinary abundant numbers, and it is the only reliable way to decide the question. It is also worth noting that it is unknown whether any odd weird number exists — a reminder that even with a solid search method, some questions about these numbers remain open.
Open questions
One of the most persistent open questions in the study of weird numbers is simple to state and hard to answer: does an odd weird number exist? Every weird number that has been found so far is even, and no one has produced a proof that this must always be the case. A weird number calculator can check individual candidates quickly, but no amount of checking one number at a time settles the general question. The search continues because the definition itself does not rule out odd examples.
To see why the question is not trivial, recall what makes a number weird. A weird number is abundant — its proper divisors sum to more than the number — but no subset of those divisors sums exactly to the number. The smallest example is 70: its proper divisors sum to 74, yet no subset of them makes 70. Abundance alone is not enough to produce a weird number. Many abundant numbers are semiperfect instead, meaning some subset of their divisors does add up to the number itself. The number 12 is abundant, with a divisor sum of 16, but it is not weird, because a subset of its divisors sums to 12. The number 20 is abundant too, with a divisor sum of 22, but it is semiperfect, so it is not weird either.
The gap between abundant and semiperfect is where weird numbers live, and that gap is narrow. Weird numbers are rare, which is part of why the odd case remains unresolved. Rare objects are hard to study statistically, and a rarity among even numbers gives little guidance about whether the odd side is empty or merely unexplored. A weird number calculator is useful here as a practical tool: it lets you test a specific number by summing its proper divisors and then checking whether any subset reaches the target. That answers the question for one input at a time, but it does not answer the question for all odd numbers at once.
So the honest summary is that the odd weird number problem is open. All known weird numbers are even, and it is unknown whether any odd weird number exists. Anyone who tells you otherwise is going beyond what is established. If you use a weird number calculator to test odd candidates, treat each result as a single data point rather than a resolution of the larger question. The definition is settled; the existence question is not.
FAQs
What is a weird number?
A weird number is an abundant number that is not semiperfect. Its proper divisors add up to more than the number itself, yet no subset of those divisors adds up to exactly the number. Both conditions must hold, so a number that fails either part is not weird.
What is the smallest weird number?
The smallest weird number is 70. Its proper divisors sum to 74, which is more than 70, so 70 is abundant. Even so, no subset of those divisors totals exactly 70. That combination makes 70 the first weird number.
Is 12 a weird number?
No. 12 is abundant, since its proper divisors sum to 16. But 12 is also semiperfect, because 6 + 4 + 2 = 12. Since a subset of its divisors reaches 12 exactly, it fails the second part of the weird number test.
Is 20 a weird number?
No. 20 is abundant because its proper divisors sum to 22, which is more than 20. However, 20 is semiperfect, meaning some subset of its proper divisors adds up to exactly 20. Because it is semiperfect, it is not weird.
What is the difference between abundant and weird?
Every weird number is abundant, but most abundant numbers are semiperfect and therefore not weird. Abundant only means the proper divisors sum past the number. Weird adds a second requirement: no subset of those divisors may sum exactly to the number.
Are there odd weird numbers?
None is known, and whether one exists is an open problem. Every weird number found so far is even, but no proof rules out an odd one. Until such a number is found or an odd weird number is proven impossible, the question stays open.