Check if numbers are prime, generate lists of prime numbers, or find the nth prime number. Perfect for mathematics, cryptography, and number theory.
What are Prime Numbers?
A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. Prime numbers are fundamental building blocks in number theory.
Properties of Prime Numbers
- The only even prime number is 2
- All other primes are odd numbers
- There are infinitely many prime numbers
- Prime numbers become less frequent as numbers get larger
Primality Testing Methods
- Trial Division: Check divisibility up to √n
- Sieve of Eratosthenes: Generate all primes up to n
- Miller-Rabin: Probabilistic test for large numbers
Applications
- Cryptography and RSA encryption
- Hash functions and checksums
- Random number generation
- Mathematical research and proofs
First 25 Prime Numbers
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97