Skip to content

Commit

Permalink
perfect-numbers: 'natural number' -> 'positive integer'
Browse files Browse the repository at this point in the history
There is no convention whether zero is a natural number, so let's avoid
the issue.

For example, see:
- https://mathworld.wolfram.com/NaturalNumber.html
- https://en.wikipedia.org/wiki/Natural_number
- https://math.stackexchange.com/questions/283/is-0-a-natural-number

The previous wording of
```
  "description": "Zero is rejected (not a natural number)",
```
could be especially jarring for some tracks. For example, Nim defines
`Natural` and `Positive` types, and `Natural` includes 0. See:
- https://nim-lang.github.io/Nim/system.html#Natural

Co-authored-by: Sascha Mann <[email protected]>

exercism/problem-specifications#1691
  • Loading branch information
ee7 authored and petertseng committed Oct 16, 2020
1 parent 3c92cc6 commit 46a30c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exercises/perfect-numbers/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Perfect Numbers

Determine if a number is perfect, abundant, or deficient based on
Nicomachus' (60 - 120 CE) classification scheme for natural numbers.
Nicomachus' (60 - 120 CE) classification scheme for positive integers.

The Greek mathematician [Nicomachus](https://en.wikipedia.org/wiki/Nicomachus) devised a classification scheme for natural numbers, identifying each as belonging uniquely to the categories of **perfect**, **abundant**, or **deficient** based on their [aliquot sum](https://en.wikipedia.org/wiki/Aliquot_sum). The aliquot sum is defined as the sum of the factors of a number not including the number itself. For example, the aliquot sum of 15 is (1 + 3 + 5) = 9
The Greek mathematician [Nicomachus](https://en.wikipedia.org/wiki/Nicomachus) devised a classification scheme for positive integers, identifying each as belonging uniquely to the categories of **perfect**, **abundant**, or **deficient** based on their [aliquot sum](https://en.wikipedia.org/wiki/Aliquot_sum). The aliquot sum is defined as the sum of the factors of a number not including the number itself. For example, the aliquot sum of 15 is (1 + 3 + 5) = 9

- **Perfect**: aliquot sum = number
- 6 is a perfect number because (1 + 2 + 3) = 6
Expand Down

0 comments on commit 46a30c4

Please sign in to comment.