Prime Finder

Discover prime numbers with the Sieve of Eratosthenes and primality testing

Sieve of Eratosthenes

Prime List Generator

Prime Factorization

Primality Test

Help

What is the Sieve of Eratosthenes?

The Sieve of Eratosthenes is an ancient algorithm for finding all prime numbers up to a given limit. It works by:

  1. Creating a list of all numbers from 2 to the limit
  2. Starting with 2, marking all its multiples as composite
  3. Moving to the next unmarked number and repeating
  4. Continuing until you've processed all numbers up to √limit

All remaining unmarked numbers are prime!

How does primality testing work?

The tool uses trial division: testing if the number is divisible by any integer from 2 to √n.

Why √n? If n = a × b where both a, b > √n, then a × b > n, which is impossible. So at least one factor must be ≤ √n.

What is prime factorization?

Prime factorization breaks a number down into its prime factors. Every integer > 1 can be uniquely expressed as a product of primes.

Example: 60 = 2² × 3 × 5

This is called the Fundamental Theorem of Arithmetic.

Why is 1 not prime?

By definition, a prime number must have exactly two distinct positive divisors: 1 and itself.

The number 1 only has one divisor (itself), so it doesn't meet this criterion. This definition makes many theorems and formulas work correctly.