In mathematics, a prime number is a natural number greater than 1 that is not a product of two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number.
Checking if a number is prime or not is an important task in many areas of mathematics, including number theory, cryptography, and computer science. There are a number of different algorithms that can be used to check if a number is prime, including the trial division method, the Fermat primality test, and the Miller-Rabin primality test.