We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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