Loading Calculator...
Please wait a moment
Please wait a moment
Check primality, find primes in a range, or discover the nth prime number
A prime number is a natural number greater than 1 that has exactly two factors: 1 and itself. In other words, it can only be divided evenly by 1 and the number itself.
Examples:
Why only check up to √n? If n = a × b and a ≤ b, then a ≤ √n. So we only need to check for factors up to the square root.
By definition, a prime number must have exactly two distinct factors: 1 and itself. Since 1 only has one factor (itself), it doesn't meet this requirement. This definition is used to make mathematical theorems and formulas work consistently, especially the Fundamental Theorem of Arithmetic.
Yes! 2 is the only even prime number because any other even number can be divided by 2, giving it at least three factors: 1, 2, and itself. This makes 2 unique among all prime numbers.
There are infinitely many prime numbers. This was proven by the ancient Greek mathematician Euclid over 2,000 years ago. No matter how large a number you choose, there will always be prime numbers larger than it.
The Sieve of Eratosthenes is one of the most efficient algorithms for finding all primes up to a given number N. It works by iteratively marking the multiples of each prime as composite, starting from 2.
Prime numbers are fundamental in mathematics and have practical applications in cryptography, computer science, and coding theory. Modern encryption systems like RSA rely on the difficulty of factoring large numbers into their prime components.
Mersenne primes are primes of the form 2^p - 1, where p is also prime. They're named after Marin Mersenne, a 17th-century French monk. Most of the largest known primes are Mersenne primes because there's an efficient test (Lucas-Lehmer test) to check if they're prime.