Weird Number Calculator

Enter a number to check if it's weird, or specify a range to generate all weird numbers within it.

Weird Number Check or Generate

What is a Weird Number?

A weird number is a special type of natural number, defined as follows:

  • It is an abundant number (the sum of its proper divisors exceeds the number itself).
  • However, no subset of its proper divisors sums up to the number itself, meaning it is not a semiperfect number.

How to Determine if a Number is a Weird Number

  1. Check if it's a positive integer: Ensure the input is a valid positive integer.
  2. Find the proper divisors: Identify all divisors of the number except itself.
  3. Calculate the total sum of divisors: Sum up all the proper divisors.
  4. Test subset sums: Check if any subset of the divisors sums up to the number itself.
  5. Compare results: If the sum of the divisors exceeds the number and no subset sums up to the number, it is a weird number. Otherwise, it is not a weird number.

Examples

Example 1: Is 12 a Weird Number?

Solution:

Positive integer check: 12 is a positive integer.

Proper divisors: 1, 2, 3, 4, 6.

Total sum of divisors: 1 + 2 + 3 + 4 + 6 = 16

Subset sum check: 2 + 4 + 6 = 12

Result: Since a subset equals 12, it is not a weird number.

Example 2: Is 28 a Weird Number?

Solution:

Positive integer check: 28 is a positive integer.

Proper divisors: 1, 2, 4, 7, 14.

Total sum of divisors: 1 + 2 + 4 + 7 + 14 = 28

Result: The total sum equals 28, making it not a weird number (it is a perfect number).

Example 3: Is 70 a Weird Number?

Solution:

Positive integer check: 70 is a positive integer.

Proper divisors: 1, 2, 5, 7, 10, 14, 35.

Total sum of divisors: 1 + 2 + 5 + 7 + 10 + 14 + 35 = 74

Subset sum check:

  • 5 + 7 + 10 + 14 + 35 = 71
  • 1 + 5 + 7 + 10 + 14 + 35 = 72
  • 1 + 2 + 7 + 10 + 14 + 35 = 69
  • 1 + 2 + 5 + 10 + 14 + 35 = 67

Result: Since no subset equals 70 and the total sum exceeds 70, 70 is a weird number.