Prime Number Checker

Check if a number is prime and analyze its mathematical properties

Number Analysis
Enter a positive integer to check if it's prime

Maximum: 1,000,000

Prime Analysis
Mathematical properties and factorization

Enter a number to check if it's prime

Example Numbers
Click to test common number types

Small Prime

17

Large Prime

97

Composite

24

Perfect Square

49

Mersenne Prime

31

Twin Prime

29

Famous Prime Numbers
Notable primes in mathematics

Smallest Prime

2

The only even prime number

Largest 2-digit Prime

97

The largest prime less than 100

Mersenne Prime

31

2^5 - 1, a Mersenne prime

Sophie Germain Prime

23

p where 2p+1 is also prime

Understanding Prime Numbers

What is a Prime Number?

A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. For example, 7 is prime because its only factors are 1 and 7.

Prime Factorization

Every composite number can be expressed as a unique product of prime numbers. For example, 12 = 2² × 3, where 2 and 3 are the prime factors.

Testing Algorithm

We test divisibility up to the square root of the number. If no divisors are found, the number is prime. This is much more efficient than testing all numbers up to n.

Applications

Prime numbers are fundamental in cryptography, computer science, and mathematics. They're used in RSA encryption, hash functions, and random number generation.