Post History
Abundant numbers are numbers which are less than their proper divisor sum. For example $18$ is abundant as $1 + 2 + 3 + 6 + 9 = 21 > 18$ Deficient numbers are numbers which are greater than the...
#1: Initial revision
Are they abundant, deficient or perfect?
[Abundant numbers](https://en.wikipedia.org/wiki/Abundant_number) are numbers which are less than their [proper divisor sum](https://en.wikipedia.org/wiki/Aliquot_sum). For example \$18\$ is abundant as \$1 + 2 + 3 + 6 + 9 = 21 > 18\$ [Deficient numbers](https://en.wikipedia.org/wiki/Deficient_number) are numbers which are greater than their proper divisor sum. For example, \$15\$ is deficient as \$1 + 3 + 5 = 9 < 15\$ [Perfect numbers](https://en.wikipedia.org/wiki/Perfect_number) are numbers wich are equal to their proper divisor sum. For example, \$6\$ is perfect as \$1 + 2 + 3 = 6\$. You should take a positive integer \$x \ge 12\$ and output three lists. The lists should contain, in any order, the abundant numbers less than or equal to \$x\$, the deficient numbers less than or equal to \$x\$ and the perfect numbers less than or equal to \$x\$. For example, if \$x = 15\$, the output could look like [[12], [6], [1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15]] This is code golf, so the shortest code in bytes wins ## Test cases ``` 49 -> [[12, 18, 20, 24, 30, 36, 40, 42, 48], [6, 28], [1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19, 21, 22, 23, 25, 26, 27, 29, 31, 32, 33, 34, 35, 37, 38, 39, 41, 43, 44, 45, 46, 47, 49]] 32 -> [[12, 18, 20, 24, 30], [6, 28], [1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19, 21, 22, 23, 25, 26, 27, 29, 31, 32]] 16 -> [[12], [6], [1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16]] 29 -> [[12, 18, 20, 24], [6, 28], [1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19, 21, 22, 23, 25, 26, 27, 29]] 23 -> [[12, 18, 20], [6], [1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19, 21, 22, 23]]