Prime numbers look simple at first: they are positive whole numbers with exactly two positive factors. Yet this basic idea sits at the heart of number theory and plays an important role in factorization, divisibility, mathematics, and modern computing.
The first few prime numbers are 2, 3, 5, 7, 11, and 13. Unlike composite numbers, a prime cannot be broken into a product of two smaller positive integers other than 1 and itself. The number 2 is especially important because it is the only even prime number.
Quick answer: Prime numbers are positive integers greater than 1 that have exactly two positive factors: 1 and the number itself. Examples include 2, 3, 5, 7, 11, 13, and 17. The number 1 is not prime, while 2 is the smallest and only even prime number.
What Are Prime Numbers?
A prime number is a positive integer greater than 1 that is divisible without a remainder by exactly two positive integers:
- 1
- The number itself
Consider 7. Its positive factors are:
1 and 7
There is no other positive whole number that divides 7 evenly, so 7 is prime.
Now consider 12. Its factors are:
1, 2, 3, 4, 6, and 12
Because 12 has more than two factors, it is a composite number.
This difference between prime and composite numbers is fundamental. Khan Academy similarly defines prime numbers as numbers with exactly two factors and composite numbers as numbers with more than two factors.
Prime vs. Composite Numbers
| Feature | Prime Number | Composite Number |
|---|---|---|
| Number of positive factors | Exactly 2 | More than 2 |
| Factors include | 1 and itself | 1, itself, and at least one additional factor |
| Examples | 2, 3, 5, 7, 11 | 4, 6, 8, 9, 10 |
| Can be factored into smaller positive integers? | No, except 1 × itself | Yes |
| Smallest example | 2 | 4 |
For example:
13 = 1 × 13
So 13 is prime.
But:
15 = 1 × 15 = 3 × 5
Therefore, 15 is composite.
List of Prime Numbers from 1 to 100
There are 25 prime numbers below 100:
| Range | Prime Numbers |
|---|---|
| 1–10 | 2, 3, 5, 7 |
| 11–20 | 11, 13, 17, 19 |
| 21–30 | 23, 29 |
| 31–40 | 31, 37 |
| 41–50 | 41, 43, 47 |
| 51–60 | 53, 59 |
| 61–70 | 61, 67 |
| 71–80 | 71, 73, 79 |
| 81–90 | 83, 89 |
| 91–100 | 97 |
Written as one sequence, they are:
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
Notice that 1 does not appear in the list. It is neither prime nor composite because it has only one positive factor.
Why Is 1 Not a Prime Number?
This is one of the most common questions about prime numbers.
The number 1 has only one positive factor:
1
A prime must have exactly two distinct positive factors: 1 and itself.
For 7, those factors are 1 and 7.
For 13, they are 1 and 13.
For 1, however, “1” and “itself” refer to the same factor. Therefore, there is only one distinct positive divisor.
That means 1 does not satisfy the definition of a prime number. It is also not composite because composite numbers have more than two positive factors.
There is also a deeper mathematical reason for excluding 1 from the primes: doing so allows prime factorization to have a clean, unique form.
For example:
12 = 2 × 2 × 3
If 1 were treated as prime, we could write:
12 = 2 × 2 × 3
or
12 = 1 × 2 × 2 × 3
or
12 = 1 × 1 × 2 × 2 × 3
and continue adding 1s indefinitely.
Excluding 1 makes the structure of prime factorization much cleaner.
Why Is 2 a Prime Number?
The number 2 is prime because its only positive factors are:
1 and 2
It therefore has exactly two factors.
It is also the smallest prime number and the only even prime number.
Why is every other even number composite?
An even integer greater than 2 is divisible by:
- 1
- 2
- itself
That gives it at least three positive factors.
For example:
8 ÷ 2 = 4
The factors of 8 include 1, 2, 4, and 8, so 8 is composite.
The same reasoning applies to 4, 6, 10, 12, 14, and every other even integer greater than 2.
How to Identify Prime Numbers
For small numbers, checking whether a number is prime is fairly straightforward.
Suppose you want to determine whether 29 is prime.
Step 1: Check whether the number is greater than 1
29 is greater than 1, so it could be prime.
Step 2: Check simple divisibility rules
29 is not even, so it is not divisible by 2.
Its digits add to:
2 + 9 = 11
Since 11 is not divisible by 3, 29 is not divisible by 3.
29 does not end in 0 or 5, so it is not divisible by 5.
Step 3: Test possible factors only as far as necessary
You do not need to test every integer below 29.
For a number (n), it is enough to test possible prime divisors up to (\sqrt{n}). If a composite number has a factor larger than its square root, the corresponding factor paired with it must be smaller than the square root.
Since:
√29 ≈ 5.39
you only need to check prime divisors up to 5:
2, 3, and 5
None divides 29 evenly.
Therefore:
29 is prime.
Another Example: Is 91 Prime?
Calculate:
√91 ≈ 9.54
The relevant prime divisors to test are:
2, 3, 5, and 7
91 is not divisible by 2, 3, or 5.
But:
91 ÷ 7 = 13
Therefore:
91 = 7 × 13
So 91 is composite.
This example is useful because 91 can look prime at first glance. Testing divisibility systematically avoids guessing.
Useful Divisibility Rules for Finding Prime Numbers
Divisibility rules can quickly eliminate many composite numbers.
Divisible by 2
A number is divisible by 2 when its last digit is:
0, 2, 4, 6, or 8
Every such positive integer greater than 2 is composite.
Divisible by 3
Add the digits. If their sum is divisible by 3, the original number is divisible by 3.
For example:
123 → 1 + 2 + 3 = 6
Since 6 is divisible by 3, 123 is divisible by 3.
Divisible by 5
A number is divisible by 5 if it ends in:
0 or 5
Therefore, every integer greater than 5 ending in 0 or 5 is composite.
Divisible by 7
There are divisibility shortcuts for 7, but for small numbers, direct division is often simpler.
These tests do not prove by themselves that a large number is prime, but they quickly eliminate many candidates.
The Sieve of Eratosthenes
The Sieve of Eratosthenes is a classic method for finding all prime numbers up to a chosen limit. Modern mathematical references still describe sieving as a standard way of generating primes.
Suppose you want all primes from 2 through 30.
Start with:
2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
Then:
- Keep 2 and cross out every multiple of 2 greater than 2.
- Move to 3 and cross out every multiple of 3 greater than 3.
- Move to 5 and cross out its remaining multiples.
- Continue with the next uncrossed number.
- The numbers that remain are prime.
The result is:
2, 3, 5, 7, 11, 13, 17, 19, 23, 29
Why the Sieve Works
Every composite number has smaller factors.
By repeatedly removing multiples of known primes, the sieve eliminates composite numbers and leaves primes behind.
For a limit (N), you only need to perform the crossing-out process using primes up to (\sqrt{N}). After that point, every remaining composite number would already have been eliminated by a smaller prime factor.
Important Properties of Prime Numbers
Prime numbers have several useful properties that make them central to mathematics.
1. Every Prime Number Is Greater Than 1
By definition, primes are positive integers greater than 1.
So:
- 0 is not prime.
- 1 is not prime.
- Negative integers are not prime under the standard elementary definition of prime numbers.
2. 2 Is the Only Even Prime
Every even integer greater than 2 has 2 as a factor in addition to 1 and itself.
Therefore, it is composite.
3. All Prime Numbers Greater Than 2 Are Odd
This follows directly from the previous property.
However, the reverse is not true.
Not every odd number is prime.
For example:
9 = 3 × 3
15 = 3 × 5
21 = 3 × 7
All three are odd but composite.
4. Prime Numbers Greater Than 5 End in 1, 3, 7, or 9
In base 10, an integer ending in an even digit is divisible by 2.
An integer ending in 0 or 5 is divisible by 5.
So a prime greater than 5 can only end in:
1, 3, 7, or 9
This is a useful filter, but not a primality test.
For example:
21 ends in 1 but is composite.
39 ends in 9 but is composite.
The final digit can rule some numbers out; it cannot prove that a number is prime.
5. There Are Infinitely Many Prime Numbers
Prime numbers never stop.
No matter how far you travel along the positive integers, there will always be another prime.
This result has been known since ancient Greek mathematics and is one of the foundational facts of number theory.
Prime Factorization
Prime factorization means expressing a positive integer greater than 1 as a product of prime numbers.
Consider 60:
60 = 2 × 30
Then:
30 = 2 × 15
And:
15 = 3 × 5
Therefore:
60 = 2 × 2 × 3 × 5
Using exponents:
60 = 2² × 3 × 5
The numbers 2, 3, and 5 are all prime.
Factor Tree Example
A factor tree provides a visual way to perform prime factorization.
Take 72:
72 = 8 × 9
Then:
8 = 2 × 4
4 = 2 × 2
and:
9 = 3 × 3
So:
72 = 2 × 2 × 2 × 3 × 3
or:
72 = 2³ × 3²
The process stops when every factor is prime.
Why Prime Factorization Matters
Prime numbers are often described as the building blocks of positive integers because composite integers can be decomposed into prime factors.
This idea is formalized by the Fundamental Theorem of Arithmetic: every integer greater than 1 is either prime itself or can be represented as a product of primes, uniquely apart from the order of the factors.
Consider:
84 = 2² × 3 × 7
You can reorder the factors:
84 = 7 × 3 × 2 × 2
but the underlying prime factors remain the same.
Prime factorization is useful for finding:
- Greatest common factors (GCF)
- Least common multiples (LCM)
- Common denominators
- Simplified fractions
- Divisibility relationships
- Structure within integers
This is one reason primes occupy such a central position in elementary and advanced number theory.
Prime Numbers, Factors, and Multiples
Factors and multiples are closely connected to prime numbers but describe different relationships.
A factor divides a number evenly.
For 12:
Factors: 1, 2, 3, 4, 6, 12
A multiple is produced by multiplying a number by an integer.
Multiples of 12 include:
12, 24, 36, 48, 60, …
Khan Academy similarly distinguishes factors as numbers that divide evenly into another number and multiples as numbers produced through multiplication.
A prime has only two positive factors, but it has infinitely many multiples.
For example, the factors of 7 are only:
1 and 7
Yet multiples of 7 continue indefinitely:
7, 14, 21, 28, 35, 42, …
Co-Prime Numbers and Prime Numbers Are Different
A common mistake is assuming that co-prime numbers must both be prime.
They do not.
Two integers are co-prime, or relatively prime, when their greatest common divisor is 1.
For example:
8 and 15
Neither number is prime:
8 = 2³
15 = 3 × 5
But they have no prime factor in common, so their greatest common divisor is 1.
Therefore, 8 and 15 are co-prime.
Any two different prime numbers are also co-prime because they do not share a positive factor other than 1.
Twin Prime Numbers
Twin primes are pairs of prime numbers whose difference is 2.
Examples include:
- 3 and 5
- 5 and 7
- 11 and 13
- 17 and 19
- 29 and 31
- 41 and 43
For instance:
13 − 11 = 2
Since both 11 and 13 are prime, they form a twin-prime pair.
Twin primes are an important subject in number theory because mathematicians continue to investigate the distribution of such pairs among increasingly large integers.
Common Mistakes When Working With Prime Numbers
The definition is short, but several mistakes appear repeatedly.
Mistake 1: Treating 1 as Prime
1 has only one positive factor, so it is neither prime nor composite.
Mistake 2: Thinking Every Odd Number Is Prime
Odd numbers can be composite.
For example:
27 = 3 × 9
Therefore, 27 is not prime.
Mistake 3: Thinking 2 Is Composite Because It Is Even
2 has exactly two positive factors—1 and 2—so it is prime. It is the only even prime.
Mistake 4: Checking Every Number Up to n − 1
To determine whether (n) is prime, you do not normally need to test every possible divisor below (n).
Testing prime candidates up to (\sqrt{n}) is enough for straightforward trial division.
Mistake 5: Assuming a Number Is Prime Because It Passes One Test
Suppose 49 is not divisible by 2, 3, or 5.
That does not make it prime:
49 = 7 × 7
Primality requires ruling out all relevant possible divisors, not simply checking one or two.
How Many Prime Numbers Are There?
There are infinitely many prime numbers.
However, primes become less frequent as numbers grow larger. The prime number theorem describes this long-term distribution and shows that the number of primes up to a large value (x) is approximately:
x / ln(x)
where ln(x) is the natural logarithm of (x).
This does not tell you exactly where the next prime will occur. Instead, it describes how densely primes are distributed among large integers.
The contrast is one of the fascinating features of prime numbers: individual primes can appear irregularly, while their overall distribution follows strong mathematical patterns. MathWorld notes this combination of apparent local unpredictability and broader regularity in the distribution of primes.
Are There Very Large Prime Numbers?
Yes. Prime numbers are not restricted to the small values used in school exercises.
Mathematicians and computer researchers search for primes containing millions of digits.
One especially important family is formed by Mersenne numbers, which have the form:
2ᵖ − 1
where (p) is typically prime when searching for Mersenne primes.
Not every number of this form is prime, but some enormous known primes belong to this family.
MathWorld reports that the Mersenne prime (2^{136279841}-1), discovered in 2024, contains 41,024,320 decimal digits.
This illustrates just how far prime-number research extends beyond the familiar primes below 100.
Why Are Prime Numbers Important?
Prime numbers are not simply a classroom topic. Their properties influence many areas of mathematics and computing.
Number Theory
The study of primes is a central part of number theory. Questions about their factorization, patterns, frequency, and distribution have driven mathematical research for centuries.
Fractions and Arithmetic
Prime factorization makes it easier to find common factors, least common multiples, and simplified fractions.
Algorithms
Computer programs use specialized algorithms to determine whether large numbers are prime and to generate primes efficiently.
Simple trial division works well for small numbers, while much more sophisticated methods are needed for very large integers.
Cryptography
Prime numbers also have major applications in public-key cryptography.
Some cryptographic systems rely on mathematical operations involving large prime numbers and on computational problems connected with integer factorization or related number-theoretic structures.
The key lesson is not simply that “primes make encryption secure.” Different cryptographic systems use different mathematical assumptions. Rather, prime-number arithmetic provides important structures used in several widely studied cryptographic techniques.
A Simple Way to Remember Prime Numbers
For beginners, the easiest rule is:
A prime number is greater than 1 and has exactly two positive factors: 1 and itself.
Then remember the two special cases:
1 is not prime.
2 is the only even prime.
From there, use divisibility rules and trial division to classify larger numbers.
For example:
17
Factors: 1 and 17 → Prime
25
Factors: 1, 5, and 25 → Composite
31
Factors: 1 and 31 → Prime
51
Since:
51 = 3 × 17
51 is composite.
Practice: Identify the Prime Numbers
Consider these numbers:
14, 17, 23, 27, 31, 35, 41, 49
Check them one by one:
- 14 = 2 × 7 → composite
- 17 → prime
- 23 → prime
- 27 = 3 × 9 → composite
- 31 → prime
- 35 = 5 × 7 → composite
- 41 → prime
- 49 = 7 × 7 → composite
So the prime numbers are:
17, 23, 31, and 41
A useful habit is to look for a factor rather than trying to “recognize” primes by appearance. If you find any positive divisor other than 1 and the number itself, you have proved that the number is composite.
Prime Numbers at a Glance
| Question | Answer |
|---|---|
| What is a prime number? | An integer greater than 1 with exactly two positive factors |
| What is the smallest prime? | 2 |
| Is 1 prime? | No |
| Is 2 prime? | Yes |
| Is 2 the only even prime? | Yes |
| Is every odd number prime? | No |
| Are there infinitely many primes? | Yes |
| First five primes | 2, 3, 5, 7, 11 |
| What is a composite number? | An integer greater than 1 with more than two positive factors |
| How can primes be generated systematically? | Methods include the Sieve of Eratosthenes |
Final Thoughts on Prime Numbers
Prime numbers are integers greater than 1 with exactly two positive factors: 1 and themselves. That simple definition explains why 2, 3, 5, 7, and 11 are prime while numbers such as 4, 6, 8, 9, and 10 are composite.
Understanding prime numbers becomes much easier once you connect them with factors, divisibility, composite numbers, and prime factorization. Remember that 1 is neither prime nor composite, 2 is the only even prime, and every integer greater than 1 can be understood through its relationship with primes.
For practical problems, start with simple divisibility rules and test possible prime factors only up to the square root of the number. That approach turns identifying primes from guesswork into a clear mathematical process.
