properDivisors - nodef/extra-bigint GitHub Wiki
List all divisors of a bigint, except itself.
Similar: properDivisors, aliquotSum. Similar: properDivisors, primeFactors, primeExponentials, isPrime.
function properDivisors(x)
// x: a bigint
const xbigint = require('extra-bigint');
xbigint.properDivisors(6n);
// → [1n, 2n, 3n]
xbigint.properDivisors(1n);
// → []
xbigint.properDivisors(0n);
// → []
xbigint.properDivisors(-24n);
// → [1n, 2n, 3n, 4n, 6n, 8n, 12n]