There was an error while loading. Please reload this page.
Find the greatest prime number which divides a number.
Similar: minPrimeFactor, maxPrimeFactor, primeFactors.
function maxPrimeFactor(x) // x: a number
const xmath = require('extra-number'); xmath.maxPrimeFactor(1); // → 0 xmath.maxPrimeFactor(3); // → 3 xmath.maxPrimeFactor(21); // → 7 xmath.maxPrimeFactor(55); // → 11 xmath.maxPrimeFactor(53); // → 53