Prime Number Checker

    Check if a number is prime, find factors, and list primes in a range.

    ✓ PRIME

    17 is the 7th prime number

    Previous prime

    13

    Factorization

    17

    Next prime

    19

    Find Primes in Range

    to
    Advertisement

    Understanding Prime Numbers

    A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. The first few primes are 2, 3, 5, 7, 11, 13, 17, 19, 23, and 29. The number 2 is the only even prime — all other even numbers are divisible by 2. Prime numbers are the building blocks of all natural numbers: every integer greater than 1 can be expressed as a unique product of primes (the Fundamental Theorem of Arithmetic).

    The ancient Greek mathematician Euclid proved around 300 BC that there are infinitely many primes. His elegant proof by contradiction assumes a finite list of primes, multiplies them all together, adds 1, and shows the result must have a prime factor not in the original list. This proof remains one of the most beautiful in all of mathematics.

    The Sieve of Eratosthenes

    The Sieve of Eratosthenes, developed around 240 BC, is an efficient algorithm for finding all primes up to a given limit. Start by listing all numbers from 2 to n. Mark 2 as prime and cross out all its multiples. Find the next unmarked number (3), mark it as prime, and cross out its multiples. Continue until you've processed all numbers up to √n. The remaining unmarked numbers are all prime.

    Primes in Cryptography

    Modern cryptography relies heavily on prime numbers. RSA encryption, which secures most internet communications, works by multiplying two very large primes (hundreds of digits each) to create a public key. While multiplying two primes is easy, factoring their product back into the original primes is computationally infeasible for large numbers. This asymmetry is the foundation of public-key cryptography.

    Famous Conjectures

    Several unsolved problems about primes fascinate mathematicians. The Twin Prime Conjecture states that there are infinitely many pairs of primes differing by 2 (like 11 and 13). Goldbach's Conjecture (1742) asserts that every even number greater than 2 is the sum of two primes. The Riemann Hypothesis, perhaps the most important unsolved problem in mathematics, concerns the distribution of primes and carries a $1 million prize.

    Primes in Nature

    Some cicada species emerge in cycles of 13 or 17 years — both prime numbers. Biologists believe this evolved to minimize overlap with predators that have shorter, periodic life cycles. If a predator has a 2-year cycle, a 12-year cicada cycle would overlap every 12 years, but a 13-year cycle only overlaps every 26 years.

    Frequently Asked Questions

    Advertisement