Prime test

Returns true or false depending on whether the number is prime (an integer ≥ 2 with no divisors other than 1 and itself).

Very large numbers may produce an error.

Syntax

isPrime(Number)

Examples

Factorization and primality

The factor command can be used to write an integer in factored form. The isPrime command can be used to check whether a number is prime.