Post History
#4: Post edited
Multiplicative perfection
- Multiplicative perfection [FINALIZED]
- Given a positive integer, indicate whether it is the product of its proper divisors.
- Integers equal to the product of their proper divisors can be found on the Online Encyclopedia of Integer Sequences as the [Multiplicatively perfect numbers](https://oeis.org/A007422).
- ## Input
- - A positive integer N.
- ## Output
- - One of 2 distinct values to indicate whether N is equal to the product of its proper divisors (that is, the product of all positive integers strictly less than N that divide exactly into N).
- - Note that the input 1 counts as the product of its proper divisors, despite having no proper divisors. The product of an empty set of numbers is 1.
- ## Examples
- Input | Proper divisors | Product | Input = Product ?
- ------|-----------------|---------|-----------------
- 1 | - | 1 | true
- 6 | 1, 2, 3 | 6 | true
- 8 | 1, 2, 4 | 8 | true
- 9 | 1, 3 | 3 | false
- 11 | 1 | 1 | false
- 12 | 1, 2, 3, 4, 6 | 144 | false
- ## Test cases
- Test cases are in the format `input : output`.
- Note that the outputs can be any 2 distinct values. They do not have to be `true` and `false`.
- ```text
- 1 : true
- 2 : false
- 3 : false
- 4 : false
- 5 : false
- 6 : true
- 7 : false
- 8 : true
- 9 : false
- 10 : true
- 11 : false
- 12 : false
- 13 : false
- 14 : true
- 15 : true
- 16 : false
- 17 : false
- 18 : false
- 19 : false
- 20 : false
- 21 : true
- 22 : true
- 23 : false
- 24 : false
- 25 : false
- 26 : true
- 27 : true
- 28 : false
- 29 : false
- 30 : false
- 31 : false
- 32 : false
- 33 : true
- 34 : true
- 35 : true
- 36 : false
- 37 : false
- 38 : true
- 39 : true
- 40 : false
- 41 : false
- 42 : false
- 43 : false
- 44 : false
- 45 : false
- 46 : true
- 47 : false
- 48 : false
- 49 : false
- 50 : false
- 51 : true
- 52 : false
- 53 : false
- 54 : false
- 55 : true
- 56 : false
- 57 : true
- 58 : true
- 59 : false
- 60 : false
- 61 : false
- 62 : true
- 63 : false
- 64 : false
- 65 : true
- 66 : false
- 67 : false
- 68 : false
- 69 : true
- 70 : false
- 71 : false
- 72 : false
- 73 : false
- 74 : true
- 75 : false
- 76 : false
- 77 : true
- 78 : false
- 79 : false
- 80 : false
- 81 : false
- 82 : true
- 83 : false
- 84 : false
- 85 : true
- 86 : true
- 87 : true
- 88 : false
- 89 : false
- 90 : false
- 91 : true
- 92 : false
- 93 : true
- 94 : true
- 95 : true
- 96 : false
- 97 : false
- 98 : false
- 99 : false
- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code. Lowest score for each language wins.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
- # Now posts: [Multiplicative perfection](https://codegolf.codidact.com/posts/292741)
- ---
- Given a positive integer, indicate whether it is the product of its proper divisors.
- Integers equal to the product of their proper divisors can be found on the Online Encyclopedia of Integer Sequences as the [Multiplicatively perfect numbers](https://oeis.org/A007422).
- ## Input
- - A positive integer N.
- ## Output
- - One of 2 distinct values to indicate whether N is equal to the product of its proper divisors (that is, the product of all positive integers strictly less than N that divide exactly into N).
- - Note that the input 1 counts as the product of its proper divisors, despite having no proper divisors. The product of an empty set of numbers is 1.
- ## Examples
- Input | Proper divisors | Product | Input = Product ?
- ------|-----------------|---------|-----------------
- 1 | - | 1 | true
- 6 | 1, 2, 3 | 6 | true
- 8 | 1, 2, 4 | 8 | true
- 9 | 1, 3 | 3 | false
- 11 | 1 | 1 | false
- 12 | 1, 2, 3, 4, 6 | 144 | false
- ## Test cases
- Test cases are in the format `input : output`.
- Note that the outputs can be any 2 distinct values. They do not have to be `true` and `false`.
- ```text
- 1 : true
- 2 : false
- 3 : false
- 4 : false
- 5 : false
- 6 : true
- 7 : false
- 8 : true
- 9 : false
- 10 : true
- 11 : false
- 12 : false
- 13 : false
- 14 : true
- 15 : true
- 16 : false
- 17 : false
- 18 : false
- 19 : false
- 20 : false
- 21 : true
- 22 : true
- 23 : false
- 24 : false
- 25 : false
- 26 : true
- 27 : true
- 28 : false
- 29 : false
- 30 : false
- 31 : false
- 32 : false
- 33 : true
- 34 : true
- 35 : true
- 36 : false
- 37 : false
- 38 : true
- 39 : true
- 40 : false
- 41 : false
- 42 : false
- 43 : false
- 44 : false
- 45 : false
- 46 : true
- 47 : false
- 48 : false
- 49 : false
- 50 : false
- 51 : true
- 52 : false
- 53 : false
- 54 : false
- 55 : true
- 56 : false
- 57 : true
- 58 : true
- 59 : false
- 60 : false
- 61 : false
- 62 : true
- 63 : false
- 64 : false
- 65 : true
- 66 : false
- 67 : false
- 68 : false
- 69 : true
- 70 : false
- 71 : false
- 72 : false
- 73 : false
- 74 : true
- 75 : false
- 76 : false
- 77 : true
- 78 : false
- 79 : false
- 80 : false
- 81 : false
- 82 : true
- 83 : false
- 84 : false
- 85 : true
- 86 : true
- 87 : true
- 88 : false
- 89 : false
- 90 : false
- 91 : true
- 92 : false
- 93 : true
- 94 : true
- 95 : true
- 96 : false
- 97 : false
- 98 : false
- 99 : false
- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code. Lowest score for each language wins.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
#3: Post edited
Given a positive integer, indicate whether it is the product of its strict factors.Those that are can be found on the Online Encyclopedia of Integer Sequences as the [Multiplicatively perfect numbers](https://oeis.org/A007422).- ## Input
- - A positive integer N.
- ## Output
- One of 2 distinct values to indicate whether N is equal to the product of its strict factors (that is, the product of all positive integers strictly less than N that divide exactly into N).- Note that the input 1 counts as the product of its strict factors, despite having no strict factors. The product of an empty set of numbers is 1.- ## Examples
### True examples- For input 6, the strict factors of 6 are 1, 2, and 3. 1 * 2 * 3 = 6, so 6 is the product of its strict factors.- For input 8, the strict factors of 8 are 1, 2, and 4. 1 * 2 * 4 = 8, so 8 is the product of its strict factors.### False examples- For input 9, the strict factors of 9 are 1 and 3. 1 * 3 = 3, so 9 is not the product of its strict factors.- For input 11, the strict factors of 11 are just 1, so 11 is not the product of its strict factors.- For input 12, the strict factors of 12 are 1, 2, 3, 4, and 6. 1 * 2 * 3 * 4 * 6 = 144, so 12 is not the product of its strict factors.- ## Test cases
- Test cases are in the format `input : output`.
- Note that the outputs can be any 2 distinct values. They do not have to be `true` and `false`.
- ```text
- 1 : true
- 2 : false
- 3 : false
- 4 : false
- 5 : false
- 6 : true
- 7 : false
- 8 : true
- 9 : false
- 10 : true
- 11 : false
- 12 : false
- 13 : false
- 14 : true
- 15 : true
- 16 : false
- 17 : false
- 18 : false
- 19 : false
- 20 : false
- 21 : true
- 22 : true
- 23 : false
- 24 : false
- 25 : false
- 26 : true
- 27 : true
- 28 : false
- 29 : false
- 30 : false
- 31 : false
- 32 : false
- 33 : true
- 34 : true
- 35 : true
- 36 : false
- 37 : false
- 38 : true
- 39 : true
- 40 : false
- 41 : false
- 42 : false
- 43 : false
- 44 : false
- 45 : false
- 46 : true
- 47 : false
- 48 : false
- 49 : false
- 50 : false
- 51 : true
- 52 : false
- 53 : false
- 54 : false
- 55 : true
- 56 : false
- 57 : true
- 58 : true
- 59 : false
- 60 : false
- 61 : false
- 62 : true
- 63 : false
- 64 : false
- 65 : true
- 66 : false
- 67 : false
- 68 : false
- 69 : true
- 70 : false
- 71 : false
- 72 : false
- 73 : false
- 74 : true
- 75 : false
- 76 : false
- 77 : true
- 78 : false
- 79 : false
- 80 : false
- 81 : false
- 82 : true
- 83 : false
- 84 : false
- 85 : true
- 86 : true
- 87 : true
- 88 : false
- 89 : false
- 90 : false
- 91 : true
- 92 : false
- 93 : true
- 94 : true
- 95 : true
- 96 : false
- 97 : false
- 98 : false
- 99 : false
- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code. Lowest score for each language wins.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
- Given a positive integer, indicate whether it is the product of its proper divisors.
- Integers equal to the product of their proper divisors can be found on the Online Encyclopedia of Integer Sequences as the [Multiplicatively perfect numbers](https://oeis.org/A007422).
- ## Input
- - A positive integer N.
- ## Output
- - One of 2 distinct values to indicate whether N is equal to the product of its proper divisors (that is, the product of all positive integers strictly less than N that divide exactly into N).
- - Note that the input 1 counts as the product of its proper divisors, despite having no proper divisors. The product of an empty set of numbers is 1.
- ## Examples
- Input | Proper divisors | Product | Input = Product ?
- ------|-----------------|---------|-----------------
- 1 | - | 1 | true
- 6 | 1, 2, 3 | 6 | true
- 8 | 1, 2, 4 | 8 | true
- 9 | 1, 3 | 3 | false
- 11 | 1 | 1 | false
- 12 | 1, 2, 3, 4, 6 | 144 | false
- ## Test cases
- Test cases are in the format `input : output`.
- Note that the outputs can be any 2 distinct values. They do not have to be `true` and `false`.
- ```text
- 1 : true
- 2 : false
- 3 : false
- 4 : false
- 5 : false
- 6 : true
- 7 : false
- 8 : true
- 9 : false
- 10 : true
- 11 : false
- 12 : false
- 13 : false
- 14 : true
- 15 : true
- 16 : false
- 17 : false
- 18 : false
- 19 : false
- 20 : false
- 21 : true
- 22 : true
- 23 : false
- 24 : false
- 25 : false
- 26 : true
- 27 : true
- 28 : false
- 29 : false
- 30 : false
- 31 : false
- 32 : false
- 33 : true
- 34 : true
- 35 : true
- 36 : false
- 37 : false
- 38 : true
- 39 : true
- 40 : false
- 41 : false
- 42 : false
- 43 : false
- 44 : false
- 45 : false
- 46 : true
- 47 : false
- 48 : false
- 49 : false
- 50 : false
- 51 : true
- 52 : false
- 53 : false
- 54 : false
- 55 : true
- 56 : false
- 57 : true
- 58 : true
- 59 : false
- 60 : false
- 61 : false
- 62 : true
- 63 : false
- 64 : false
- 65 : true
- 66 : false
- 67 : false
- 68 : false
- 69 : true
- 70 : false
- 71 : false
- 72 : false
- 73 : false
- 74 : true
- 75 : false
- 76 : false
- 77 : true
- 78 : false
- 79 : false
- 80 : false
- 81 : false
- 82 : true
- 83 : false
- 84 : false
- 85 : true
- 86 : true
- 87 : true
- 88 : false
- 89 : false
- 90 : false
- 91 : true
- 92 : false
- 93 : true
- 94 : true
- 95 : true
- 96 : false
- 97 : false
- 98 : false
- 99 : false
- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code. Lowest score for each language wins.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
#2: Post edited
- Given a positive integer, indicate whether it is the product of its strict factors.
- Those that are can be found on the Online Encyclopedia of Integer Sequences as the [Multiplicatively perfect numbers](https://oeis.org/A007422).
- ## Input
- - A positive integer N.
- ## Output
- One of 2 distinct values to indicate whether N is equal to the product of all positive integers less than N that divide exactly into N.- - Note that the input 1 counts as the product of its strict factors, despite having no strict factors. The product of an empty set of numbers is 1.
- ## Examples
- ### True examples
- - For input 6, the strict factors of 6 are 1, 2, and 3. 1 * 2 * 3 = 6, so 6 is the product of its strict factors.
- - For input 8, the strict factors of 8 are 1, 2, and 4. 1 * 2 * 4 = 8, so 8 is the product of its strict factors.
- ### False examples
- - For input 9, the strict factors of 9 are 1 and 3. 1 * 3 = 3, so 9 is not the product of its strict factors.
- - For input 11, the strict factors of 11 are just 1, so 11 is not the product of its strict factors.
- - For input 12, the strict factors of 12 are 1, 2, 3, 4, and 6. 1 * 2 * 3 * 4 * 6 = 144, so 12 is not the product of its strict factors.
- ## Test cases
- Test cases are in the format `input : output`.
- Note that the outputs can be any 2 distinct values. They do not have to be `true` and `false`.
- ```text
- 1 : true
- 2 : false
- 3 : false
- 4 : false
- 5 : false
- 6 : true
- 7 : false
- 8 : true
- 9 : false
- 10 : true
- 11 : false
- 12 : false
- 13 : false
- 14 : true
- 15 : true
- 16 : false
- 17 : false
- 18 : false
- 19 : false
- 20 : false
- 21 : true
- 22 : true
- 23 : false
- 24 : false
- 25 : false
- 26 : true
- 27 : true
- 28 : false
- 29 : false
- 30 : false
- 31 : false
- 32 : false
- 33 : true
- 34 : true
- 35 : true
- 36 : false
- 37 : false
- 38 : true
- 39 : true
- 40 : false
- 41 : false
- 42 : false
- 43 : false
- 44 : false
- 45 : false
- 46 : true
- 47 : false
- 48 : false
- 49 : false
- 50 : false
- 51 : true
- 52 : false
- 53 : false
- 54 : false
- 55 : true
- 56 : false
- 57 : true
- 58 : true
- 59 : false
- 60 : false
- 61 : false
- 62 : true
- 63 : false
- 64 : false
- 65 : true
- 66 : false
- 67 : false
- 68 : false
- 69 : true
- 70 : false
- 71 : false
- 72 : false
- 73 : false
- 74 : true
- 75 : false
- 76 : false
- 77 : true
- 78 : false
- 79 : false
- 80 : false
- 81 : false
- 82 : true
- 83 : false
- 84 : false
- 85 : true
- 86 : true
- 87 : true
- 88 : false
- 89 : false
- 90 : false
- 91 : true
- 92 : false
- 93 : true
- 94 : true
- 95 : true
- 96 : false
- 97 : false
- 98 : false
- 99 : false
- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code. Lowest score for each language wins.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
- Given a positive integer, indicate whether it is the product of its strict factors.
- Those that are can be found on the Online Encyclopedia of Integer Sequences as the [Multiplicatively perfect numbers](https://oeis.org/A007422).
- ## Input
- - A positive integer N.
- ## Output
- - One of 2 distinct values to indicate whether N is equal to the product of its strict factors (that is, the product of all positive integers strictly less than N that divide exactly into N).
- - Note that the input 1 counts as the product of its strict factors, despite having no strict factors. The product of an empty set of numbers is 1.
- ## Examples
- ### True examples
- - For input 6, the strict factors of 6 are 1, 2, and 3. 1 * 2 * 3 = 6, so 6 is the product of its strict factors.
- - For input 8, the strict factors of 8 are 1, 2, and 4. 1 * 2 * 4 = 8, so 8 is the product of its strict factors.
- ### False examples
- - For input 9, the strict factors of 9 are 1 and 3. 1 * 3 = 3, so 9 is not the product of its strict factors.
- - For input 11, the strict factors of 11 are just 1, so 11 is not the product of its strict factors.
- - For input 12, the strict factors of 12 are 1, 2, 3, 4, and 6. 1 * 2 * 3 * 4 * 6 = 144, so 12 is not the product of its strict factors.
- ## Test cases
- Test cases are in the format `input : output`.
- Note that the outputs can be any 2 distinct values. They do not have to be `true` and `false`.
- ```text
- 1 : true
- 2 : false
- 3 : false
- 4 : false
- 5 : false
- 6 : true
- 7 : false
- 8 : true
- 9 : false
- 10 : true
- 11 : false
- 12 : false
- 13 : false
- 14 : true
- 15 : true
- 16 : false
- 17 : false
- 18 : false
- 19 : false
- 20 : false
- 21 : true
- 22 : true
- 23 : false
- 24 : false
- 25 : false
- 26 : true
- 27 : true
- 28 : false
- 29 : false
- 30 : false
- 31 : false
- 32 : false
- 33 : true
- 34 : true
- 35 : true
- 36 : false
- 37 : false
- 38 : true
- 39 : true
- 40 : false
- 41 : false
- 42 : false
- 43 : false
- 44 : false
- 45 : false
- 46 : true
- 47 : false
- 48 : false
- 49 : false
- 50 : false
- 51 : true
- 52 : false
- 53 : false
- 54 : false
- 55 : true
- 56 : false
- 57 : true
- 58 : true
- 59 : false
- 60 : false
- 61 : false
- 62 : true
- 63 : false
- 64 : false
- 65 : true
- 66 : false
- 67 : false
- 68 : false
- 69 : true
- 70 : false
- 71 : false
- 72 : false
- 73 : false
- 74 : true
- 75 : false
- 76 : false
- 77 : true
- 78 : false
- 79 : false
- 80 : false
- 81 : false
- 82 : true
- 83 : false
- 84 : false
- 85 : true
- 86 : true
- 87 : true
- 88 : false
- 89 : false
- 90 : false
- 91 : true
- 92 : false
- 93 : true
- 94 : true
- 95 : true
- 96 : false
- 97 : false
- 98 : false
- 99 : false
- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code. Lowest score for each language wins.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
#1: Initial revision
Multiplicative perfection
Given a positive integer, indicate whether it is the product of its strict factors. Those that are can be found on the Online Encyclopedia of Integer Sequences as the [Multiplicatively perfect numbers](https://oeis.org/A007422). ## Input - A positive integer N. ## Output - One of 2 distinct values to indicate whether N is equal to the product of all positive integers less than N that divide exactly into N. - Note that the input 1 counts as the product of its strict factors, despite having no strict factors. The product of an empty set of numbers is 1. ## Examples ### True examples - For input 6, the strict factors of 6 are 1, 2, and 3. 1 * 2 * 3 = 6, so 6 is the product of its strict factors. - For input 8, the strict factors of 8 are 1, 2, and 4. 1 * 2 * 4 = 8, so 8 is the product of its strict factors. ### False examples - For input 9, the strict factors of 9 are 1 and 3. 1 * 3 = 3, so 9 is not the product of its strict factors. - For input 11, the strict factors of 11 are just 1, so 11 is not the product of its strict factors. - For input 12, the strict factors of 12 are 1, 2, 3, 4, and 6. 1 * 2 * 3 * 4 * 6 = 144, so 12 is not the product of its strict factors. ## Test cases Test cases are in the format `input : output`. Note that the outputs can be any 2 distinct values. They do not have to be `true` and `false`. ```text 1 : true 2 : false 3 : false 4 : false 5 : false 6 : true 7 : false 8 : true 9 : false 10 : true 11 : false 12 : false 13 : false 14 : true 15 : true 16 : false 17 : false 18 : false 19 : false 20 : false 21 : true 22 : true 23 : false 24 : false 25 : false 26 : true 27 : true 28 : false 29 : false 30 : false 31 : false 32 : false 33 : true 34 : true 35 : true 36 : false 37 : false 38 : true 39 : true 40 : false 41 : false 42 : false 43 : false 44 : false 45 : false 46 : true 47 : false 48 : false 49 : false 50 : false 51 : true 52 : false 53 : false 54 : false 55 : true 56 : false 57 : true 58 : true 59 : false 60 : false 61 : false 62 : true 63 : false 64 : false 65 : true 66 : false 67 : false 68 : false 69 : true 70 : false 71 : false 72 : false 73 : false 74 : true 75 : false 76 : false 77 : true 78 : false 79 : false 80 : false 81 : false 82 : true 83 : false 84 : false 85 : true 86 : true 87 : true 88 : false 89 : false 90 : false 91 : true 92 : false 93 : true 94 : true 95 : true 96 : false 97 : false 98 : false 99 : false ``` ## Scoring This is a [code golf challenge]. Your score is the number of bytes in your code. Lowest score for each language wins. > Explanations are optional, but I'm more likely to upvote answers that have one. [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"