From 521f19558fef921659cafc0228a7c0a9995fcb4d Mon Sep 17 00:00:00 2001 From: habere-et-dispertire Date: Thu, 7 Sep 2023 22:12:55 +0100 Subject: [PATCH 01/12] backticks on math and removed parens --- exercises/perfect-numbers/description.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/exercises/perfect-numbers/description.md b/exercises/perfect-numbers/description.md index cb056d92af..39164809c5 100644 --- a/exercises/perfect-numbers/description.md +++ b/exercises/perfect-numbers/description.md @@ -7,13 +7,13 @@ The aliquot sum is defined as the sum of the factors of a number not including t 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 - - 28 is a perfect number because (1 + 2 + 4 + 7 + 14) = 28 + - `6` is a perfect number because `1 + 2 + 3 = 6` + - `28` is a perfect number because `1 + 2 + 4 + 7 + 14 = 28` - **Abundant**: aliquot sum > number - - 12 is an abundant number because (1 + 2 + 3 + 4 + 6) = 16 - - 24 is an abundant number because (1 + 2 + 3 + 4 + 6 + 8 + 12) = 36 + - `12` is an abundant number because `1 + 2 + 3 + 4 + 6 = 16` + - `24` is an abundant number because `1 + 2 + 3 + 4 + 6 + 8 + 12 = 36` - **Deficient**: aliquot sum < number - - 8 is a deficient number because (1 + 2 + 4) = 7 + - `8` is a deficient number because `1 + 2 + 4 = 7` - Prime numbers are deficient Implement a way to determine whether a given number is **perfect**. From 2fe00566aba0a38b5f692c21c57eebabc69652ab Mon Sep 17 00:00:00 2001 From: habere-et-dispertire Date: Fri, 8 Sep 2023 00:31:12 +0100 Subject: [PATCH 02/12] markup "number", use has and English --- exercises/perfect-numbers/description.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/perfect-numbers/description.md b/exercises/perfect-numbers/description.md index 39164809c5..584a765925 100644 --- a/exercises/perfect-numbers/description.md +++ b/exercises/perfect-numbers/description.md @@ -3,16 +3,16 @@ Determine if a number is perfect, abundant, or deficient based on Nicomachus' (60 - 120 CE) classification scheme for positive integers. The Greek mathematician [Nicomachus][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][aliquot-sum]. -The aliquot sum is defined as the sum of the factors of a number not including the number itself. +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 +- **Perfect**: aliquot sum equals `number` - `6` is a perfect number because `1 + 2 + 3 = 6` - `28` is a perfect number because `1 + 2 + 4 + 7 + 14 = 28` -- **Abundant**: aliquot sum > number +- **Abundant**: aliquot sum is greater than `number` - `12` is an abundant number because `1 + 2 + 3 + 4 + 6 = 16` - `24` is an abundant number because `1 + 2 + 3 + 4 + 6 + 8 + 12 = 36` -- **Deficient**: aliquot sum < number +- **Deficient**: aliquot sum is less than `number` - `8` is a deficient number because `1 + 2 + 4 = 7` - Prime numbers are deficient From dee88ae153cae778e9a490d32c746127e407e016 Mon Sep 17 00:00:00 2001 From: habere-et-dispertire Date: Fri, 8 Sep 2023 01:25:55 +0100 Subject: [PATCH 03/12] reformat to: when a number ... its aliquot sum --- exercises/perfect-numbers/description.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/perfect-numbers/description.md b/exercises/perfect-numbers/description.md index 584a765925..4c0e6a4bae 100644 --- a/exercises/perfect-numbers/description.md +++ b/exercises/perfect-numbers/description.md @@ -6,13 +6,13 @@ The Greek mathematician [Nicomachus][nicomachus] devised a classification scheme 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 equals `number` +- **Perfect**: when a `number` equals its `aliquot sum` - `6` is a perfect number because `1 + 2 + 3 = 6` - `28` is a perfect number because `1 + 2 + 4 + 7 + 14 = 28` -- **Abundant**: aliquot sum is greater than `number` +- **Abundant**: when a `number` is less than its `aliquot sum` - `12` is an abundant number because `1 + 2 + 3 + 4 + 6 = 16` - `24` is an abundant number because `1 + 2 + 3 + 4 + 6 + 8 + 12 = 36` -- **Deficient**: aliquot sum is less than `number` +- **Deficient**: when a `number` is greater than its `aliquot sum` - `8` is a deficient number because `1 + 2 + 4 = 7` - Prime numbers are deficient From 6c86cdb902e26e18e771c39d4874a5484fd2b4b1 Mon Sep 17 00:00:00 2001 From: habere-et-dispertire Date: Fri, 8 Sep 2023 02:01:57 +0100 Subject: [PATCH 04/12] backtick aliquot sum --- exercises/perfect-numbers/description.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/perfect-numbers/description.md b/exercises/perfect-numbers/description.md index 4c0e6a4bae..b5cf1b2344 100644 --- a/exercises/perfect-numbers/description.md +++ b/exercises/perfect-numbers/description.md @@ -3,7 +3,7 @@ Determine if a number is perfect, abundant, or deficient based on Nicomachus' (60 - 120 CE) classification scheme for positive integers. The Greek mathematician [Nicomachus][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][aliquot-sum]. -The aliquot sum is defined as the sum of the factors of a `number` not including the `number` itself. +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**: when a `number` equals its `aliquot sum` From 544df6a315706ca0217f1ffc93d1b032add125d8 Mon Sep 17 00:00:00 2001 From: habere-et-dispertire Date: Fri, 8 Sep 2023 02:05:36 +0100 Subject: [PATCH 05/12] Another aliquot sum backticked --- exercises/perfect-numbers/description.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/perfect-numbers/description.md b/exercises/perfect-numbers/description.md index b5cf1b2344..22de5104fc 100644 --- a/exercises/perfect-numbers/description.md +++ b/exercises/perfect-numbers/description.md @@ -4,7 +4,7 @@ Determine if a number is perfect, abundant, or deficient based on Nicomachus' (6 The Greek mathematician [Nicomachus][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][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`. +For example, the `aliquot sum` of `15` is `1 + 3 + 5 = 9`. - **Perfect**: when a `number` equals its `aliquot sum` - `6` is a perfect number because `1 + 2 + 3 = 6` From dd192a67d5c84d53b7fb4770b60d88ef42265a36 Mon Sep 17 00:00:00 2001 From: habere-et-dispertire Date: Fri, 8 Sep 2023 13:13:33 +0100 Subject: [PATCH 06/12] Split into three headings Taking contributor concerns into play I've also italicized only the defining instance of aliquot sum. --- exercises/perfect-numbers/description.md | 35 ++++++++++++++++-------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/exercises/perfect-numbers/description.md b/exercises/perfect-numbers/description.md index 22de5104fc..07dd567769 100644 --- a/exercises/perfect-numbers/description.md +++ b/exercises/perfect-numbers/description.md @@ -3,18 +3,29 @@ Determine if a number is perfect, abundant, or deficient based on Nicomachus' (60 - 120 CE) classification scheme for positive integers. The Greek mathematician [Nicomachus][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][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**: when a `number` equals its `aliquot sum` - - `6` is a perfect number because `1 + 2 + 3 = 6` - - `28` is a perfect number because `1 + 2 + 4 + 7 + 14 = 28` -- **Abundant**: when a `number` is less than its `aliquot sum` - - `12` is an abundant number because `1 + 2 + 3 + 4 + 6 = 16` - - `24` is an abundant number because `1 + 2 + 3 + 4 + 6 + 8 + 12 = 36` -- **Deficient**: when a `number` is greater than its `aliquot sum` - - `8` is a deficient number because `1 + 2 + 4 = 7` - - Prime numbers are deficient +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 + +A number is perfect when it equals its aliquot sum. +For example: +- `6` is a perfect number because `1 + 2 + 3 = 6` +- `28` is a perfect number because `1 + 2 + 4 + 7 + 14 = 28` + +## Abundant + +A number is abundant when it is less than its aliquot sum. +Two examples: +- `12` is an abundant number because `1 + 2 + 3 + 4 + 6 = 16` +- `24` is an abundant number because `1 + 2 + 3 + 4 + 6 + 8 + 12 = 36` + +## Deficient + +A number is deficient when it is greater than its aliquot sum. +For example: +- `8` is a deficient number because `1 + 2 + 4 = 7` +- Prime numbers are deficient Implement a way to determine whether a given number is **perfect**. Depending on your language track, you may also need to implement a way to determine whether a given number is **abundant** or **deficient**. From 9a4254a84882431cfababbc5d4ae83b44d0266fc Mon Sep 17 00:00:00 2001 From: habere-et-dispertire Date: Fri, 8 Sep 2023 13:15:39 +0100 Subject: [PATCH 07/12] lint --- exercises/perfect-numbers/description.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/exercises/perfect-numbers/description.md b/exercises/perfect-numbers/description.md index 07dd567769..67da226ffb 100644 --- a/exercises/perfect-numbers/description.md +++ b/exercises/perfect-numbers/description.md @@ -10,6 +10,7 @@ For example, the aliquot sum of `15` is `1 + 3 + 5 = 9`. A number is perfect when it equals its aliquot sum. For example: + - `6` is a perfect number because `1 + 2 + 3 = 6` - `28` is a perfect number because `1 + 2 + 4 + 7 + 14 = 28` @@ -17,6 +18,7 @@ For example: A number is abundant when it is less than its aliquot sum. Two examples: + - `12` is an abundant number because `1 + 2 + 3 + 4 + 6 = 16` - `24` is an abundant number because `1 + 2 + 3 + 4 + 6 + 8 + 12 = 36` @@ -24,6 +26,7 @@ Two examples: A number is deficient when it is greater than its aliquot sum. For example: + - `8` is a deficient number because `1 + 2 + 4 = 7` - Prime numbers are deficient From 47c79541e1144d74ed506a39588afaf61d0dbba1 Mon Sep 17 00:00:00 2001 From: habere-et-dispertire Date: Fri, 8 Sep 2023 15:48:30 +0100 Subject: [PATCH 08/12] Link text references to headers --- exercises/perfect-numbers/description.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/exercises/perfect-numbers/description.md b/exercises/perfect-numbers/description.md index 67da226ffb..c5b262b6e5 100644 --- a/exercises/perfect-numbers/description.md +++ b/exercises/perfect-numbers/description.md @@ -30,8 +30,10 @@ For example: - `8` is a deficient number because `1 + 2 + 4 = 7` - Prime numbers are deficient -Implement a way to determine whether a given number is **perfect**. -Depending on your language track, you may also need to implement a way to determine whether a given number is **abundant** or **deficient**. +# Task + +Implement a way to determine whether a given number is [perfect](#perfect). +Depending on your language track, you may also need to implement a way to determine whether a given number is [abundant](#abundant) or [deficient](#deficient). [nicomachus]: https://en.wikipedia.org/wiki/Nicomachus [aliquot-sum]: https://en.wikipedia.org/wiki/Aliquot_sum From ca2cec047e2286a57092c0f989ee39bf04922c32 Mon Sep 17 00:00:00 2001 From: habere-et-dispertire Date: Fri, 8 Sep 2023 15:53:59 +0100 Subject: [PATCH 09/12] lint --- exercises/perfect-numbers/description.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/perfect-numbers/description.md b/exercises/perfect-numbers/description.md index c5b262b6e5..27a04b9529 100644 --- a/exercises/perfect-numbers/description.md +++ b/exercises/perfect-numbers/description.md @@ -30,7 +30,7 @@ For example: - `8` is a deficient number because `1 + 2 + 4 = 7` - Prime numbers are deficient -# Task +## Task Implement a way to determine whether a given number is [perfect](#perfect). Depending on your language track, you may also need to implement a way to determine whether a given number is [abundant](#abundant) or [deficient](#deficient). From 486785fe3fa09fea0416f6735698d4268c0ab79e Mon Sep 17 00:00:00 2001 From: habere-et-dispertire Date: Fri, 8 Sep 2023 16:08:56 +0100 Subject: [PATCH 10/12] Two => For --- exercises/perfect-numbers/description.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/perfect-numbers/description.md b/exercises/perfect-numbers/description.md index 27a04b9529..a15f26f2a6 100644 --- a/exercises/perfect-numbers/description.md +++ b/exercises/perfect-numbers/description.md @@ -17,7 +17,7 @@ For example: ## Abundant A number is abundant when it is less than its aliquot sum. -Two examples: +For examples: - `12` is an abundant number because `1 + 2 + 3 + 4 + 6 = 16` - `24` is an abundant number because `1 + 2 + 3 + 4 + 6 + 8 + 12 = 36` From 8230e0bbcbcb8df4d21d302c1297501a754b9da5 Mon Sep 17 00:00:00 2001 From: habere-et-dispertire Date: Fri, 8 Sep 2023 16:16:20 +0100 Subject: [PATCH 11/12] More intra-doc links --- exercises/perfect-numbers/description.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/perfect-numbers/description.md b/exercises/perfect-numbers/description.md index a15f26f2a6..ccd0025800 100644 --- a/exercises/perfect-numbers/description.md +++ b/exercises/perfect-numbers/description.md @@ -2,7 +2,7 @@ Determine if a number is perfect, abundant, or deficient based on Nicomachus' (60 - 120 CE) classification scheme for positive integers. -The Greek mathematician [Nicomachus][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][aliquot-sum]. +The Greek mathematician [Nicomachus][nicomachus] devised a classification scheme for positive integers, identifying each as belonging uniquely to the categories of [perfect](#perfect), [abundant](#abundant), or [deficient](#deficient) based on their [aliquot sum][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`. From 44f0c7bab65397f4c6af9ff9afbec23542bdf86e Mon Sep 17 00:00:00 2001 From: habere-et-dispertire Date: Fri, 8 Sep 2023 17:14:54 +0100 Subject: [PATCH 12/12] examples => example --- exercises/perfect-numbers/description.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/perfect-numbers/description.md b/exercises/perfect-numbers/description.md index ccd0025800..0beaf436d0 100644 --- a/exercises/perfect-numbers/description.md +++ b/exercises/perfect-numbers/description.md @@ -17,7 +17,7 @@ For example: ## Abundant A number is abundant when it is less than its aliquot sum. -For examples: +For example: - `12` is an abundant number because `1 + 2 + 3 + 4 + 6 = 16` - `24` is an abundant number because `1 + 2 + 3 + 4 + 6 + 8 + 12 = 36`