Skip to content

primeExponentials

Subhajit Sahu edited this page Aug 9, 2022 · 1 revision

Find the prime factors and respective exponents of a bigint.

Similar: properDivisors, primeFactors, primeExponentials, isPrime.


function primeExponentials(x)
// x: a bigint

const xbigint = require('extra-bigint');


xbigint.primeExponentials(1n);
// → []

xbigint.primeExponentials(9n);
// → [[3n, 2n]]

xbigint.primeExponentials(63n);
// → [[3n, 2n], [7n, 1n]]

xbigint.primeExponentials(605n);
// → [[5n, 1n], [11n, 2n]]

xbigint.primeExponentials(53n);
// → [[53n, 1n]]


References

Clone this wiki locally