PPrime Number
Prime Numbers: Definition, Examples and How to Test Them
Prime Numbernoun
A prime number is a whole number greater than that can be divided evenly only by and by itself.
That short rule sorts every whole number from upward into two groups: primes, which cannot be broken into smaller factors, and the rest, which can. The sections below cover what the word means, why is left out, how to test a number, and where primes quietly hold up modern life.
What is a prime number?
Take the number . Its only positive factors are and , so it is prime. Take : it factors as and also , so it has three factors and is not prime. In symbols, a prime satisfies the rule that if divides , then or .
The word comes from the Latin numerus primus, “first number.” The idea is that primes come first in the sense of being the original pieces: every other whole number above is built by multiplying primes together. The ancient Greeks used a word with the same meaning, and the habit of calling them “first” has stuck for more than two thousand years.
The study of primes belongs to number theory, the branch of math about whole numbers and their patterns. Anything that is not prime and is larger than is a composite number, which has at least one extra factor besides and itself.
Why isn’t 1 a prime number?
The number has exactly one positive factor, itself, and a prime needs exactly two. That is the quick answer. The deeper reason is that math works better without it. If were prime, then and would be different prime factorizations, and the clean statement “every number has exactly one prime factorization” would need an awkward exception.
Some textbooks and tables from the 1800s and early 1900s did count as prime. Modern math settled the other way, and every current curriculum excludes it.
Two misconceptions go with this. The first is “all primes are odd.” The number is prime and even, and it is the only even prime, because every larger even number is divisible by and so has at least three factors. The second is “all odd numbers are prime.” Counterexamples such as , , and show that oddness does not make a number prime.
Quick check
has the factors , and , so it has exactly three; has two, has four and has one.
Prime numbers from 1 to 100
There are 25 prime numbers up to 100. Grouped by tens, they look like this:
- 1 to 10: 2, 3, 5, 7
- 11 to 20: 11, 13, 17, 19
- 21 to 30: 23, 29
- 31 to 40: 31, 37
- 41 to 50: 41, 43, 47
- 51 to 60: 53, 59
- 61 to 70: 61, 67
- 71 to 80: 71, 73, 79
- 81 to 90: 83, 89
- 91 to 100: 97
Primes thin out as numbers grow: four in the first ten, only one in the last ten. Still, there are primes below . A handy pattern is that numbers ending in 0, 2, 4, 6 or 8 are even, and those ending in 0 or 5 are divisible by 5, so every prime above ends in , , or . That narrows the search but does not finish it, since , , and end in those digits and are composite.
Some primes have extra personalities. The prime is a happy number too: , squaring and adding digits at each step.
Two primes that differ by are called twin primes, such as and , or and . Nobody has yet proved whether there are infinitely many pairs.
Prime vs composite vs coprime: what is the difference?
Three words get mixed up constantly. A prime has exactly two factors. A composite number has more than two. “Coprime” is not a type of number at all: it describes a pair of numbers that share no factor except .
| Term | Meaning | Example |
|---|---|---|
| Prime | Exactly two positive factors | (factors , ) |
| Composite | Three or more positive factors | (factors ) |
| Coprime pair | Greatest common factor is | and |
| Neither | Zero or one factor pattern that fits no group | (and ) |
The pair and shows why the distinction matters: neither number is prime, yet together they are coprime, because and share no prime. Two different primes are always coprime, but coprime numbers do not have to be prime. Most confusion about “prime” questions on tests comes from treating these as the same idea.
How do you check whether a number is prime?

You do not need to test every smaller number. If a number factors as , then at least one of or is at most , because two factors both above would multiply to more than . So you only try prime divisors up to the square root of .
- Estimate .
- List the primes up to that estimate.
- Check whether is divisible by each one. Any exact division proves composite.
- If none divides it, is prime.
Three worked examples:
- Is 91 prime? , so try . Divisibility by , and fails, but . It is composite, and it fools many people because it looks prime.
- Is 101 prime? , so try . It is odd, its digit sum is , it does not end in or , and leaves remainder . It is prime.
- Is 221 prime? , so try up to . The tests for , , , and all fail, but . Composite.
Try this: Decide whether is prime. Work out , list the primes below it, and test each one before checking the answer ().
Quick check
, so only primes up to matter, and the largest of those is .
Prime factorization: why primes are the building blocks
Every whole number above is either prime or a product of primes, and the product is unique apart from order. This is the fundamental theorem of arithmetic. For example:
You can check it: and . No other set of primes multiplies to . A factor tree is the usual way to find such a breakdown: split the number into any two factors, then keep splitting until every branch ends in a prime.
Uniqueness is what makes primes useful. Writing numbers as products of primes lets you simplify fractions, find greatest common factors, and work out common multiples by comparing which primes each number contains. This is why the theorem, rather than the definition alone, explains why mathematicians care about primes.
Are there infinitely many prime numbers?
Yes, and Euclid proved it around 300 BCE in his Elements. The idea is a proof by contradiction (see reductio ad absurdum). Suppose the primes were a finite list. Multiply them all together and add . The result leaves remainder when divided by any prime on the list, so its prime factors must be primes the list missed. That contradicts the assumption, so the list can never be complete. You can read more about the man behind it on the page for Euclid.
A common misconception is that the number built this way is itself prime. It often is not. Multiply the first six primes and add one:
The number is composite, yet its factors and are both new primes, which is all the proof needs.
Because primes never run out, there is no largest one, only a largest known one. At the time of writing it is 2^136,279,841 − 1, with 41,024,320 decimal digits, found by Luke Durant in October 2024. There is also no known simple formula that separates primes from composite numbers, which is why record hunters use special forms like Mersenne primes.
The primes and are neighbors, with thirteen composite numbers ( through ) between them. Gaps between consecutive primes can be made as long as you like.
Quick check
Euclid only needs the product plus one to have a prime factor missing from the list, and and are both outside .
How are prime numbers written in textbooks?
There is no single symbol for “prime number.” Letters like and stand for an unspecified prime. The th prime gets a subscript: , , , . The set of all primes is often written , or with set-builder notation as the set of natural numbers with exactly two positive divisors.
Two more pieces of notation appear in later courses. The statement reads ” divides .” The prime-counting function gives the number of primes less than or equal to , so . This has nothing to do with the circle constant.
Terms vary by region too. US books say “greatest common factor” where UK books say “highest common factor,” and “relatively prime” is a second name for coprime. In abstract algebra, “prime” is stretched to include negative numbers: counts as a prime element of the integers, though school math never uses that.
Where do prime numbers show up in real life?
Online security depends on them. RSA encryption multiplies two very large primes to make a public key. Multiplying is easy: . Recovering the two primes from a product with hundreds of digits is so slow that it protects bank transfers and messages. Primes also set the sizes of hash tables in software, because prime sizes spread data evenly.
Nature has a possible example. Some cicadas emerge every or years, both prime. One explanation is that a prime cycle rarely lines up with the shorter cycles of predators, though this remains a hypothesis rather than a settled fact.
Here is the surprising part: the smallest prime, , and the largest known prime are linked by the same rule, and the rule is just two factors. Everything from a classroom factor tree to a 41-million-digit record comes from that one idea.
Common questions
Is 1 a prime number?
No. A prime needs exactly two different positive factors, and has only one. Excluding it also keeps prime factorization unique, because otherwise would count as different factorizations.
What are the first 10 prime numbers?
The first ten primes are . The next ones are .
Why is 2 the only even prime number?
Every even number greater than is divisible by , so it has at least three factors: , and itself. Only itself has just the two factors and .
How many prime numbers are there between 1 and 100?
There are . They run from up to , and is the last prime before .
Is there a largest prime number?
No, there are infinitely many primes, so no largest one exists. The largest prime anyone has found so far is a Mersenne prime with 41,024,320 digits, discovered in October 2024.