🔍 Is it Prime?

Try:

🧮 Sieve of Eratosthenes (1–200)

Blue = Prime   Grey = Composite. Click any number to check it.

There are 46 prime numbers between 1 and 200.

📋 Find Primes in a Range

💡 Prime Number Facts

♾️
Infinite Primes
There are infinitely many prime numbers. Euclid proved this around 300 BCE: assume a finite list of all primes, multiply them together and add 1 — the result is either prime or has a prime factor not in the original list. Either way, your list was incomplete!
🔒
Primes & Cryptography
Modern internet security (RSA encryption) relies on the fact that multiplying two large primes is easy, but factoring the result is computationally hard. Your bank uses primes with hundreds of digits. Breaking RSA-2048 would take longer than the age of the universe with current computers.
🏆
Largest Known Prime
As of 2024, the largest known prime is 2¹³,⁴⁶⁶,⁹¹⁷ − 1, a Mersenne prime with over 40 million digits! Found by the GIMPS (Great Internet Mersenne Prime Search) project. These primes have the form 2ⁿ − 1 and are discovered using distributed computing.
🌀
The Riemann Hypothesis
The Riemann Hypothesis (1859) predicts the exact distribution of prime numbers along the number line — but it remains unproven. It's one of the Millennium Prize Problems: solve it and win $1 million. The Clay Mathematics Institute has offered this prize since 2000.
👯
Twin Primes
Twin primes are pairs of primes that differ by 2, like (3,5), (11,13), (17,19), (41,43). The Twin Prime Conjecture says there are infinitely many such pairs — but this has never been proven! In 2013, Yitang Zhang proved there are infinitely many prime pairs within 70 million of each other.
🔢
Goldbach's Conjecture
Every even number greater than 2 can be expressed as the sum of two primes. Example: 8 = 3+5, 28 = 11+17. Proposed by Christian Goldbach in 1742, verified up to 4×10¹⁸ by computer, but never proven for all even numbers. One of the oldest unsolved problems in mathematics!
🐚
Primes in Nature
Cicadas emerge from underground every 13 or 17 years — both prime numbers! This is believed to be an evolutionary strategy: by emerging at prime-number intervals, cicadas minimize overlap with predator population cycles (which tend to follow shorter, composite cycles).
2️⃣
The Only Even Prime
2 is the only even prime number. Every other even number is divisible by 2, so it can't be prime. This makes 2 unique — it's sometimes called "the oddest prime" because it's the only even one. All primes greater than 2 are odd.

📐 Prime Number Formulas & Theory

Definition of a Prime Number

A prime number p is a natural number > 1 that has
exactly TWO factors: 1 and itself.

Prime: 2, 3, 5, 7, 11, 13, 17, 19, 23...
Composite: 4=2×2, 6=2×3, 8=2×2×2, 9=3×3...
Special: 1 is NEITHER prime nor composite

Trial Division Algorithm

To check if n is prime, only test divisors up to √n.

isPrime(n):
if n < 2: return False
if n == 2: return True
if n % 2 == 0: return False
for i from 3 to √n (step 2):
if n % i == 0: return False
return True

Why √n? If n = a×b and a ≤ b,
then a ≤ √n — so we only need to check up to √n.

Prime Factorization

Every composite number can be uniquely expressed as a product of primes (Fundamental Theorem of Arithmetic).

Algorithm: divide by smallest prime, repeat

Example: 360
360 ÷ 2 = 180
180 ÷ 2 = 90
90 ÷ 2 = 45
45 ÷ 3 = 15
15 ÷ 3 = 5
5 ÷ 5 = 1
360 = 2³ × 3² × 5

Mersenne Primes

Mersenne primes have the form: Mₙ = 2ⁿ − 1
(where n must itself be prime)

M₂ = 3, M₃ = 7, M₅ = 31, M₇ = 127
M₁₃ = 8191, M₁₇ = 131071

Not all 2ⁿ−1 are prime: M₄ = 15 = 3×5 (composite)
Only 51 Mersenne primes known as of 2024.

Prime Counting Function π(x)

π(x) = number of primes ≤ x

π(10) = 4 (primes: 2,3,5,7)
π(100) = 25
π(1000) = 168
π(10⁶) = 78,498
π(10⁹) = 50,847,534

Prime Number Theorem: π(x) ≈ x / ln(x)

❓ Frequently Asked Questions

🤖
AI Insights — Coming Soon!
AI-powered prime number explanations, factorization walkthroughs, and number theory concepts.
Coming Soon — Stay Tuned!