math

Prime Number

A natural number greater than 1 that has no positive divisors other than 1 and itself.

A prime number can only be divided evenly by 1 and itself. The first 10 primes: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29.

Key Facts

  • 2 is the only even prime number
  • There are infinitely many primes (proved by Euclid ~300 BC)
  • Every integer > 1 can be uniquely factored into primes (Fundamental Theorem of Arithmetic)

Primality Testing

To check if n is prime, test divisibility by all primes up to √n. If none divide evenly, n is prime.

Why Primes Matter in Cybersecurity

Modern encryption (RSA) relies on the fact that multiplying two large prime numbers is fast, but factoring the resulting huge number back into its two prime factors is computationally infeasible with current technology. This asymmetry β€” easy one direction, essentially impossible the other β€” is the mathematical foundation securing online banking, HTTPS, and encrypted messaging.

The Sieve of Eratosthenes

One of the oldest known algorithms (circa 240 BC) finds all primes up to a limit by starting with a list of numbers, crossing out multiples of 2, then 3, then 5, and so on β€” whatever survives uncrossed is prime. It's still taught today as an efficient way to generate prime lists by hand or in simple code.

Related Calculators

Related Terms