There was an error while loading. Please reload this page.
Check if number is prime.
Similar: properDivisors, aliquotSum, isPrime.
function isPrime(x) // x: a number
const xmath = require('extra-math'); xmath.isPrime(7); // → true xmath.isPrime(53); // → true xmath.isPrime(4); // → false xmath.isPrime(1); // → false xmath.isPrime(0); // → false