How to use the number classifier
- Type a whole number from 1 to 1,000,000,000,000.
- Choose which kind of number you want the next five of, such as primes, happy numbers or palindromes.
- Read the headline for the divisor class (perfect, abundant or deficient) and the table for the other properties, each with a short reason.
- Use the prime factorization, divisor count and divisor sum below the table to check the result by hand.
Formula
Divisor sum: product over prime powers of (p^(e+1) - 1) / (p - 1)
Perfect: sum of proper divisors = n; abundant: more than n; deficient: less than n
Triangular: 8n + 1 is a perfect square; Armstrong: sum of digits^(digit count) = n
Happy: repeatedly adding the squares of the digits reaches 1; Harshad: n is divisible by its digit sum
Proper divisors are all the divisors of n except n itself. A number is semiprime when it is the product of exactly two primes, equal or not.
153 and 28
153 = 3^2 x 17, so it has (2+1)(1+1) = 6 divisors that add up to 234. Without 153 itself the proper divisors add up to 81, which is less than 153, so it is deficient. Its digit sum is 9 and 153 / 9 = 17, so it is a Harshad number. Cubing the digits gives 1 + 125 + 27 = 153, so it is an Armstrong number, and 153 = 17 x 18 / 2 makes it triangular. The next primes after it are 157, 163, 167, 173 and 179.
28 has the proper divisors 1, 2, 4, 7 and 14, which add up to 28, so it is perfect. It is also happy, because 28 leads to 68, 100 and then 1. The next perfect number after 28 is 496.
What the named properties mean
Each property asks a different question about the same number. Divisor-based ones (prime, perfect, abundant, deficient, semiprime) depend on how the number factors. Digit-based ones (happy, Harshad, Armstrong, palindrome) depend on how it is written in base 10, so they change if you write the number in another base. Shape-based ones (triangular, square, cube, Fibonacci, power of two) say whether it lies on a well-known sequence.
For checks on primes alone, try the prime number calculator. To see how a number looks in another base, use the number base converter.
Next five numbers with a property
The list of next five starts just above your number. Primes, palindromes and happy numbers are found by testing each number in turn. Triangular numbers, squares and Fibonacci numbers come straight from their formulas. The perfect numbers up to one trillion are 6, 28, 496, 8128, 33550336, 8589869056 and 137438691328, and no odd perfect number has ever been found. If fewer than five exist in range, the page says so.
Assumptions and limits
- Numbers are whole, positive and at most one trillion. The page uses exact whole-number arithmetic throughout.
- Digit properties use base 10. A palindrome here reads the same forward and backward as ordinary decimal digits.
- One counts as neither prime nor composite, and it is deficient because its only proper divisor sum is 0.
- Very large searches for the next numbers stop after a few million tests and say that fewer than five were found.
Frequently asked questions
What is the difference between abundant, deficient and perfect numbers?
Add up all the divisors of a number except itself. If the total is more than the number it is abundant, such as 12 with 16. If it is less it is deficient, such as 8 with 7. If it is equal it is perfect, such as 6 and 28.
What is a happy number?
Square each digit and add the squares, then repeat. A happy number eventually reaches 1, as 19 does through 82, 68 and 100. Every other number falls into a repeating loop that includes 4, 16, 37, 58, 89, 145, 42 and 20.
What is a Harshad number?
A Harshad or Niven number is divisible by the sum of its own digits. 18 qualifies because its digits add up to 9 and 18 divided by 9 is 2. 153 qualifies too.
What is an Armstrong number?
An Armstrong or narcissistic number equals the sum of its digits each raised to the power of the number of digits. The three-digit examples are 153, 370, 371 and 407, and every one-digit number counts.