-
Notifications
You must be signed in to change notification settings - Fork 0
primeExponentials
Subhajit Sahu edited this page Aug 9, 2022
·
1 revision
Find the prime factors and respective exponents of a number.
Similar: properDivisors, primeFactors, primeExponentials, isPrime.
function primeExponentials(x)
// x: a number
const xnumber = require('extra-number');
xnumber.primeExponentials(1);
// → []
xnumber.primeExponentials(9);
// → [[3, 2]]
xnumber.primeExponentials(63);
// → [[3, 2], [7, 1]]
xnumber.primeExponentials(605);
// → [[5, 1], [11, 2]]
xnumber.primeExponentials(53);
// → [[53, 1]]