n where proper divisors are all positive integers n other than n itself.
If P(n) < n then n is classed as deficient
If P(n) === n then n is classed as perfect
If P(n) > n then n is classed as abundant
Example:
6 has proper divisors of 1, 2, and 3.
1 + 2 + 3 = 6, so 6 is classed as a perfect number.
1 to 20,000 (inclusive) are in each of the three classes. Output the result as an array in the following format [deficient, perfect, abundant].
getDPA is a function.
testString: assert(typeof getDPA === 'function');
- text: getDPA should return an array.
testString: assert(Array.isArray(getDPA(100)));
- text: getDPA return value should have a length of 3.
testString: assert(getDPA(100).length === 3);
- text: getDPA(20000) should equal [15043, 4, 4953]
testString: assert.deepEqual(getDPA(20000), solution);
```