Sha256: 68180b15f75a231d02fa96ec15e6c3e4a6a752859bf4ac5dcd2fb919ba8033cf

Contents?: true

Size: 784 Bytes

Versions: 18

Compression:

Stored size: 784 Bytes

Contents

The Greek mathematican Nicomachus devised a classification scheme for
natural numbers, identifying each as belonging uniquely to the
categories of _abundant_, _perfect_, or _deficient_.  A perfect number
equals the sum of its positive divisors — the pairs of numbers whose
product yields the target number, excluding the number itself.

- Perfect: Sum of factors = number
- Abundant: Sum of factors > number
- Deficient: Sum of factors < number

The Aliquot sum is defined as the sum of the factors of a number not
including the number itself.

## Examples

- 6 is a perfect number because its divisors are 1, 2, 3 and 6 = 1 + 2 +
  3.
- 28 is a perfect number because 28 = 1 + 2 + 4 + 7 + 14.
- Prime numbers 7, 13, etc are considered deficient in the Nicomachus
  classification.

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
trackler-2.0.6.24 common/exercises/perfect-numbers/description.md
trackler-2.0.6.23 common/exercises/perfect-numbers/description.md
trackler-2.0.6.22 common/exercises/perfect-numbers/description.md
trackler-2.0.6.21 common/exercises/perfect-numbers/description.md
trackler-2.0.6.20 common/exercises/perfect-numbers/description.md
trackler-2.0.6.19 common/exercises/perfect-numbers/description.md
trackler-2.0.6.18 common/exercises/perfect-numbers/description.md
trackler-2.0.6.17 common/exercises/perfect-numbers/description.md
trackler-2.0.6.16 common/exercises/perfect-numbers/description.md
trackler-2.0.6.15 common/exercises/perfect-numbers/description.md
trackler-2.0.6.14 common/exercises/perfect-numbers/description.md
trackler-2.0.6.13 common/exercises/perfect-numbers/description.md
trackler-2.0.6.12 common/exercises/perfect-numbers/description.md
trackler-2.0.6.11 common/exercises/perfect-numbers/description.md
trackler-2.0.6.10 common/exercises/perfect-numbers/description.md
trackler-2.0.6.9 common/exercises/perfect-numbers/description.md
trackler-2.0.6.8 common/exercises/perfect-numbers/description.md
trackler-2.0.6.7 common/exercises/perfect-numbers/description.md