-
Notifications
You must be signed in to change notification settings - Fork 0
properDivisors
Subhajit Sahu edited this page Aug 9, 2022
·
4 revisions
List all divisors of a number, except itself.
Similar: properDivisors, aliquotSum.
Similar: properDivisors, primeFactors, primeExponentials, isPrime.
function properDivisors(x)
// x: a number
const xnumber = require('extra-number');
xnumber.properDivisors(6);
// → [1, 2, 3]
xnumber.properDivisors(1);
// → []
xnumber.properDivisors(0);
// → []
xnumber.properDivisors(-24);
// → [1, 2, 3, 4, 6, 8, 12]