primality test - Maple Help

isprime - primality test

 Calling Sequence isprime(n)

Parameters

 n - integer

Description

 • The isprime command is a probabilistic primality testing routine. (See prime number .)
 • It returns false if n is shown to be composite within one strong pseudo-primality test and one Lucas test. It returns true otherwise.
 • If isprime returns true, n is very probably prime - see References section. No counterexample is known and it has been conjectured that such a counter example must be hundreds of digits long.

Examples

 > $\mathrm{isprime}\left(1\right)$
 ${\mathrm{false}}$ (1)
 > $\mathrm{isprime}\left(2\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{isprime}\left(17\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{isprime}\left(21\right)$
 ${\mathrm{false}}$ (4)
 > $\mathrm{isprime}\left(11!+1\right)$
 ${\mathrm{true}}$ (5)
 > $\mathrm{isprime}\left({2}^{30}{3}^{30}+7\right)$
 ${\mathrm{true}}$ (6)