Hyperperfect Number Calculator

Number Theory

Hyperperfect test for 21 at k = 2yes - 2-hyperperfect
sigma(n)32
1 + 2 x (sigma - n - 1)21
detailit is exactly 2-hyperperfect
How this was calculated
  1. An n that satisfies n = 1 + k x (sigma(n) - n - 1) is called k-hyperperfect, where sigma is the divisor-sum function; the case k = 1 gives exactly the perfect numbers.
  2. Here sigma(21) = 32, so the right-hand side is 1 + 2 x (32 - 21 - 1) = 21.
  3. Comparing with 21 itself: the number is yes - 2-hyperperfect (it is exactly 2-hyperperfect).
  4. Hyperperfect numbers generalise the perfect numbers: every perfect number is 1-hyperperfect, and larger k values give thinner families - the 2-hyperperfect numbers begin 21, 2,133, 19,521.

A hyperperfect number generalises the perfect numbers with a single parameter. A number n is k-hyperperfect when n = 1 + k x (sigma(n) - n - 1), where sigma is the divisor-sum function. At k = 1 the equation collapses to sigma(n) = 2n - exactly the perfect numbers. At k = 2 the smallest example is 21, and at k = 3 it is 325.

This hyperperfect number calculator does both jobs. Test mode takes your n and k, computes sigma(n), evaluates the right-hand side, and also reports which k - if any - your number actually has. List mode sweeps a range for a chosen k: the 2-hyperperfect numbers up to 100,000 are 21, 2,133 and 19,521.

The family was introduced as a common roof over several classical definitions, and it behaves like one: thin, structured, and full of open problems. Whether every k admits a hyperperfect number, and whether any odd example exists beyond the perfect numbers, are both unknown.

Worked examples

Is 21 2-hyperperfect?

(Test a number · 2 · 21)

Hyperperfect test for 21 at k = 2yes - 2-hyperperfect
sigma(n)32
1 + 2 x (sigma - n - 1)21
detailit is exactly 2-hyperperfect

Is 325 3-hyperperfect?

(Test a number · 3 · 325)

Hyperperfect test for 325 at k = 3yes - 3-hyperperfect
sigma(n)434
1 + 3 x (sigma - n - 1)325
detailit is exactly 3-hyperperfect

2-hyperperfect numbers up to 100,000

(List up to n · 2 · 100000)

2-hyperperfect numbers up to 100,00021, 2,133, 19,521
count3
largest19,521
family at k = 1the perfect numbers

The hyperperfect equation

Write s = sigma(n) - n - 1 - one less than the sum of the proper divisors of n. The condition is n = 1 + k x s, so a number is hyperperfect exactly when n - 1 is a multiple of s, and the quotient is its k. For 21: sigma(21) = 32, so s = 32 - 21 - 1 = 10, and 1 + 2 x 10 = 21 - hence 21 is 2-hyperperfect.

The second anchor example is 325 at k = 3: sigma(325) = 434, s = 434 - 325 - 1 = 108, and 1 + 3 x 108 = 325. The calculator's test mode shows this arithmetic in full and, usefully, solves for the k your number actually has - testing 325 at k = 2 reports that it is 3-hyperperfect instead.

  • 21 is 2-hyperperfect: sigma = 32, 1 + 2 x 10 = 21
  • 325 is 3-hyperperfect: sigma = 434, 1 + 3 x 108 = 325
  • Test mode also solves for the k a number actually has

Perfect numbers as k = 1

Setting k = 1 in the equation gives n = 1 + (sigma(n) - n - 1) = sigma(n) - n, i.e. sigma(n) = 2n. So the 1-hyperperfect numbers are precisely the perfect numbers: 6, 28, 496, 8,128 and so on. Hyperperfection is a strict generalisation, not a neighbouring definition.

This is the cleanest way to remember the family: perfect numbers are the first slice of a one-parameter stack of families, each thinner than the last. The calculator's list mode at k = 1 reproduces the perfect numbers in range, which makes a good first check of the tool.

  • k = 1 is exactly the perfect numbers
  • 6, 28, 496, 8,128 at k = 1
  • Each larger k gives a thinner family

The 2-hyperperfect family

At k = 2 the sequence begins 21, 2,133, 19,521 - the complete list up to 100,000, as the list mode confirms. The gaps grow quickly, and the family illustrates the general pattern: hyperperfect numbers exist for many k, but they are sparse, and finding them is a matter of solving the divisibility condition (n - 1) mod (sigma(n) - n - 1) = 0 rather than scanning blindly.

A useful cautionary example is 301. It looks plausible in size, but sigma(301) = 352 gives a right-hand side of 101, not 301, so 301 is not 2-hyperperfect - indeed it is not hyperperfect for any small k. The test mode reports this plainly: no k makes it hyperperfect at this size.

  • 2-hyperperfect to 100,000: 21, 2,133, 19,521
  • 301 is a near-miss that fails outright
  • Search means solving a divisibility condition

How the calculator decides

Sigma is computed from the prime factorisation, so each test is exact. Given n and k, the page evaluates both sides of the equation and compares integers - no rounding, no approximation. It also computes the implied k = (n - 1) / (sigma(n) - n - 1) whenever that division is exact, which turns a failed test into information: you learn what the number is, not just what it is not.

List mode repeats the test across the range. Up to 100,000 this is fast, and the k = 2 output - 21, 2,133, 19,521 - has been cross-checked against independent divisor-sum computations.

  • Sigma from the factorisation; exact integer comparison
  • Failed tests still report the number's actual k, if any
  • k = 2 list to 100,000 independently cross-checked

A worked sweep at k = 2

List mode at k = 2 up to 100,000 returns exactly three numbers: 21, 2,133 and 19,521. Each can be spot-checked with test mode. The first is small enough to do by hand - sigma(21) = 32 and 1 + 2 x (32 - 21 - 1) = 21 - and the larger two pass the same integer comparison with their own sigma values.

The sweep also demonstrates the value of the implied-k report. Testing a random composite usually ends with 'no k makes it hyperperfect at this size', because sigma(n) - n - 1 rarely divides n - 1 at all. Hyperperfection is a divisibility accident, and like most divisibility accidents it becomes rarer as the numbers grow.

  • k = 2 to 100,000: 21, 2,133, 19,521
  • Most candidates fail the divisibility outright
  • Spot-check any list member in test mode

Hyperperfect, perfect and superperfect

Three neighbouring definitions reward a quick comparison. Perfect numbers need sigma(n) = 2n. Superperfect numbers need sigma(sigma(n)) = 2n - sigma composed with itself. Hyperperfect numbers need n = 1 + k(sigma(n) - n - 1) for the chosen k, which at k = 1 is the perfect condition in disguise.

The families overlap only in controlled ways: the perfect numbers are exactly the k = 1 hyperperfect slice, while superperfect numbers such as 16 belong to a different construction entirely, driven by Mersenne primes. Keeping the three equations separate - one application of sigma, two applications, or a scaled remainder - prevents most confusion between them.

  • Perfect: sigma(n) = 2n
  • Superperfect: sigma(sigma(n)) = 2n
  • Hyperperfect: n = 1 + k(sigma(n) - n - 1), with k = 1 giving perfect

Which k can occur?

Not every k is created equal. For a hyperperfect number, k is forced to be the quotient (n - 1) / (sigma(n) - n - 1), so the question 'which k occur?' is really 'which quotients occur?'. Small k occur early - 1 at n = 6, 2 at n = 21, 3 at n = 325 - but the first occurrence of each k tends to grow quickly, and some values of k have no known example at all despite deep searches.

There are also congruence restrictions: the parity and modulo structure of sigma constrains which quotients are even possible for broad classes of n. Those restrictions are how researchers prune the search - and why the test mode's habit of reporting the actual k is more than a courtesy: it maps exactly the quotient the theory is about.

  • k is a quotient, not a free choice
  • First occurrences: k = 1 at 6, k = 2 at 21, k = 3 at 325
  • Some k have no known example

Reading the list at other k

List mode rewards a sweep across k at a fixed bound. At k = 1 the list to 100,000 is the perfect numbers 6, 28, 496, 8,128. At k = 2 it is 21, 2,133, 19,521. At k = 3 the bound catches 325 early and then thins out. Watching the families trade places - dense at k = 1 by historical accident of the perfect numbers' head start, sparse elsewhere - gives a fair picture of the whole landscape in three runs.

The comparison also exposes the quotient structure: every list member at index k satisfies (n - 1) = k x (sigma(n) - n - 1) exactly, so each printed value is a small theorem. The page's numbers were verified by recomputing sigma independently for the k = 2 list, the family this batch documents most fully.

  • k = 1 list: 6, 28, 496, 8,128
  • k = 2 list: 21, 2,133, 19,521; k = 3 catches 325
  • Every list member is an exact quotient identity

Open problems

Does every positive integer k have a k-hyperperfect number? Examples are known for many k but not all, and no theorem guarantees one. Are there odd hyperperfect numbers other than the odd perfect numbers (whose existence is itself unresolved)? Also unknown.

What is known is structural: hyperperfect numbers have restricted forms modulo small primes, and for fixed k the candidates can be characterised enough to search deeply. The interplay between the classical perfect-number problem and its hyperperfect generalisation keeps the family active in the literature.

  • Not every k is known to have an example
  • Odd hyperperfect numbers: open
  • Structure theorems guide the searches

FAQs

What is a hyperperfect number?

An n satisfying n = 1 + k(sigma(n) - n - 1) for some positive integer k; it is then called k-hyperperfect.

Is 21 hyperperfect?

Yes - 21 is 2-hyperperfect: sigma(21) = 32 and 1 + 2 x (32 - 21 - 1) = 21.

What are the 2-hyperperfect numbers?

Up to 100,000 they are 21, 2,133 and 19,521.

How do hyperperfect numbers relate to perfect numbers?

The perfect numbers are exactly the 1-hyperperfect numbers: at k = 1 the equation becomes sigma(n) = 2n.

Is 325 hyperperfect?

Yes - 325 is 3-hyperperfect, since sigma(325) = 434 and 1 + 3 x 108 = 325.

Is 301 2-hyperperfect?

No - the right-hand side of the equation comes to 101, not 301.

Sources

Related calculators

Perfect Number Calculator
Classify a number as perfect, abundant or deficient by comparing it with the sum of its proper divisors (its aliquot sum).
Semiperfect Number Calculator
Test whether a number is semiperfect (pseudoperfect): whether a subset of its proper divisors sums to the number, showing the subset, the aliquot sum, and the weird-number case when an abundant number has no subset.
Superabundant Number Calculator
Test whether the abundancy index sigma(n) / n sets a new record - the superabundant numbers of Alaoglu and Erdos - or list them.