The math.primes vocabulary implements words related to prime numbers. Several useful vocabularies exist for testing primality. The Sieve of Eratosthenes in math.primes.erato is useful for testing primality below five million. For larger integers, math.primes.miller-rabin is a fast probabilistic primality test. The math.primes.lucas-lehmer vocabulary implements an algorithm for finding huge Mersenne prime numbers.