Prime Number Tester & Explorer
Explore interactive step-by-step calculations and visual graphs for these numbers.
The fascinating world of numbers
Prime numbers are integers greater than 1 with exactly two positive divisors: 1 and the number itself.
Explore interactive step-by-step calculations and visual graphs for these numbers.
| # | n (number) | Detail |
|---|---|---|
| 1 | 2 | 2 is prime |
| 2 | 3 | 3 is prime |
| 3 | 5 | 5 is prime |
| 4 | 7 | 7 is prime |
| 5 | 11 | 11 is prime |
| 6 | 13 | 13 is prime |
| 7 | 17 | 17 is prime |
| 8 | 19 | 19 is prime |
| 9 | 23 | 23 is prime |
| 10 | 29 | 29 is prime |
| 11 | 31 | 31 is prime |
| 12 | 37 | 37 is prime |
| 13 | 41 | 41 is prime |
| 14 | 43 | 43 is prime |
| 15 | 47 | 47 is prime |
| 16 | 53 | 53 is prime |
| 17 | 59 | 59 is prime |
| 18 | 61 | 61 is prime |
| 19 | 67 | 67 is prime |
| 20 | 71 | 71 is prime |
| 21 | 73 | 73 is prime |
| 22 | 79 | 79 is prime |
| 23 | 83 | 83 is prime |
| 24 | 89 | 89 is prime |
| 25 | 97 | 97 is prime |
| 26 | 127 | 127 is prime |
| 27 | 233 | 233 is prime |
| 28 | 1597 | 1597 is prime |
| 29 | 8191 | 8191 is prime |
| 30 | 28657 | 28657 is prime |
| 31 | 131071 | 131071 is prime |
| 32 | 514229 | 514229 is prime |
| 33 | 524287 | 524287 is prime |
A prime number is a positive integer strictly greater than 1 that has no positive divisors other than 1 and itself. Integers greater than 1 with three or more positive divisors are called composite 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, …
Primes are the foundational "atoms" of number theory. Just as all matter decomposes into chemical elements, all integers decompose uniquely into prime factors.
n = p₁a₁ × p₂a₂ × … × pₖaₖ
Every integer n > 1 can be represented as a product of prime numbers in exactly one way (ignoring the order of the factors).
Every prime number p > 3 can be expressed as 6k + 1 or 6k − 1
Because all other numbers modulo 6 (6k, 6k+2, 6k+3, 6k+4) are divisible by 2 or 3, all candidate primes > 3 must sit directly adjacent to multiples of 6.
π(x) ~ x / ln(x)
The total count of primes up to x, denoted π(x), asymptotically approaches x / ln(x) as x grows toward infinity.
Proved around 300 BCE by Euclid: assuming a finite list of primes and multiplying them together plus 1 produces a new number not divisible by any prime in the list, proving primes are infinite.
Pairs of primes differing by 2, such as (3, 5), (5, 7), (11, 13), (17, 19), (29, 31), (41, 43). Mathematicians conjecture there are infinitely many twin primes.
Stated by Christian Goldbach in 1742: every even integer greater than 2 can be written as the sum of two prime numbers (e.g., 4 = 2+2, 10 = 3+7 = 5+5, 100 = 3+97).
Global digital banking, HTTPS encryption, and blockchain signatures depend on the asymmetric ease of multiplying two large primes versus the extreme difficulty of factoring their composite product.
Any even integer greater than 2 is divisible by 2, giving it at least three factors (1, 2, and itself), making it composite by definition.
If 1 were prime, prime factorizations would lose their unique representation because any number could be multiplied by 1 indefinitely (e.g. 6 = 2 × 3 = 1 × 2 × 3 = 1 × 1 × 2 × 3).
Using trial division, you only need to test divisors up to √n. If no prime factor ≤ √n divides n, then n is guaranteed to be prime.