Why is 7 a prime number but 9 isn’t? Both are odd, both are greater than 1, and both appear in the same multiplication tables. The difference comes down to how many numbers divide them exactly.
Prime numbers are natural numbers greater than 1 that have exactly two distinct positive factors: 1 and the number itself. For example, 7 is prime because only 1 and 7 divide it without a remainder. By contrast, 9 is not prime because it is divisible by 1, 3, and 9.
Prime numbers are fundamental building blocks of mathematics. They help explain multiplication, factorization, divisibility, and number patterns. They also play an important role in modern cryptography and computer science.
This guide explains how prime numbers work, how to recognize them, which numbers are prime from 1 to 100 and beyond, and why mathematicians continue to study them.
What Are Prime Numbers in Mathematics?
A prime number is a positive integer greater than 1 that cannot be expressed as the product of two smaller positive integers, both greater than 1.
Consider these examples:
- 2: Its only positive factors are 1 and 2, so it is prime.
- 3: Its only positive factors are 1 and 3, so it is prime.
- 5: Its only positive factors are 1 and 5, so it is prime.
- 7: Its only positive factors are 1 and 7, so it is prime.
- 11: Its only positive factors are 1 and 11, so it is prime.
Now compare 12. Its positive factors are 1, 2, 3, 4, 6, and 12. Because it has more than two factors, 12 is a composite number.
What Are the Two Factors of a Prime Number?
Every prime number \(p\) has exactly two distinct positive divisors:
- The number 1.
- The number \(p\) itself.
For example, the prime number 13 has only two positive factors: 1 and 13.
This definition is the simplest way to distinguish prime numbers from other positive integers.
Is 1 a Prime Number?
No. 1 is neither prime nor composite.
A prime number must have exactly two distinct positive factors, but 1 has only one positive factor: itself.
Excluding 1 also ensures that the prime factorization of every integer greater than 1 is unique, apart from the order of its factors.
List of Prime Numbers From 1 to 100
There are exactly 25 prime numbers between 1 and 100.
All 25 prime numbers from 1 to 100
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
1 is excluded because it is neither prime nor composite.
Prime Numbers From 1 to 50
The 15 prime numbers between 1 and 50 are:
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47.
These are particularly useful for learning multiplication, division, and prime factorization.
Prime Numbers From 51 to 100
The 10 prime numbers between 51 and 100 are:
53, 59, 61, 67, 71, 73, 79, 83, 89, 97.
Notice that the prime numbers become less frequent as numbers grow larger, although there are infinitely many of them.
Prime Numbers From 101 to 200
There are 21 prime numbers between 101 and 200:
101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, and 199.
The first prime number greater than 100 is 101, while the largest prime below 200 is 199.
How to Identify Prime Numbers
To determine whether a number is prime, check whether it has any positive divisors other than 1 and itself.
For small numbers, this can be done through basic division. For larger numbers, a more efficient method uses the square root.
Step 1: Check Whether the Number Is Greater Than 1
Numbers less than or equal to 1 are not prime.
For example, 0 and 1 are not prime numbers. Negative integers are not considered prime under the standard elementary definition.
Step 2: Check Divisibility by 2
The number 2 is the only even prime number.
Every even integer greater than 2 is divisible by 2 and therefore composite.
For example:
\[ 18=2\times9 \]
Because 18 has factors other than 1 and 18, it is not prime.
Step 3: Test Possible Divisors Up to the Square Root
To determine whether a positive integer \(n\) is prime, it is sufficient to test prime divisors up to:
\[ \sqrt{n} \]
Why does this work?
If \(n=a\times b\) is composite, at least one of the two factors must be less than or equal to \(\sqrt{n}\). Otherwise, their product would exceed \(n\).
For example, consider 97.
\[ \sqrt{97}\approx9.85 \]
We only need to test divisibility by the prime numbers 2, 3, 5, and 7.
- 97 is not divisible by 2 because it is odd.
- 97 is not divisible by 3 because its digits add up to 16.
- 97 is not divisible by 5 because it does not end in 0 or 5.
- 97 is not divisible by 7 because 7 does not divide it exactly.
Therefore, 97 is prime.
Interactive Prime Number Checker
Check whether a number is prime
Reset
Prime number
97 is prime. Its only positive factors are 1 and 97.
For learning and checking moderately sized whole numbers. Very large integers require specialized primality-testing algorithms.
Prime Numbers vs. Composite Numbers
Prime and composite numbers are two different classifications of positive integers greater than 1.
| Property | Prime numbers | Composite numbers |
|---|---|---|
| Positive factors | Exactly 2 | More than 2 |
| Smallest example | 2 | 4 |
| Examples | 3, 5, 7, 11 | 6, 8, 9, 12 |
| Can be written as a product of smaller integers greater than 1? | No | Yes |
| May be even? | Only 2 | Yes |
| May be odd? | Yes | Yes |
Is 2 a Prime Number?
Yes. The number 2 is the smallest prime number and the only even prime.
Every other even positive integer is divisible by 2, making it composite.
Are All Odd Numbers Prime?
No. Although every prime greater than 2 is odd, not every odd number is prime.
For example:
\[ 9=3\times3 \]
\[ 15=3\times5 \]
\[ 21=3\times7 \]
All three numbers are odd but composite.
Is 0 a Prime Number?
No. Zero is neither prime nor composite. It is divisible by every nonzero integer, so it does not meet the requirement of having exactly two distinct positive factors.
Properties and Patterns of Prime Numbers
Prime numbers have several mathematical properties that make them useful for understanding number theory.
1. There Are Infinitely Many Prime Numbers
The ancient Greek mathematician Euclid proved that there are infinitely many primes.
His argument shows that no finite list can contain every prime number.
Suppose a list contained all primes. Multiply those primes together and add 1. The resulting number leaves a remainder of 1 when divided by any prime on the list.
It must therefore have a prime divisor not included in that list, contradicting the assumption that the list was complete.
2. Every Integer Greater Than 1 Has a Unique Prime Factorization
The Fundamental Theorem of Arithmetic states that every integer greater than 1 can be expressed as a product of primes in exactly one way, apart from the order of the factors.
For example:
\[ 60=2^2\times3\times5 \]
This is the unique prime factorization of 60.
3. Prime Numbers Greater Than 3 Have the Form 6k ± 1
Every prime number greater than 3 can be expressed as:
\[ 6k-1\quad\text{or}\quad6k+1 \]
where \(k\) is a positive integer.
For example:
\[ 11=6(2)-1 \]
\[ 13=6(2)+1 \]
However, not every number of this form is prime. The number 25 equals \(6(4)+1\), yet it is composite.
4. Gaps Between Consecutive Primes Vary
The difference between consecutive prime numbers is called a prime gap.
For example:
- Between 3 and 5, the gap is 2.
- Between 7 and 11, the gap is 4.
- Between 23 and 29, the gap is 6.
There is no fixed gap between all consecutive primes. In fact, prime gaps can become arbitrarily large.
5. Prime Numbers Become Less Dense
The Prime Number Theorem describes how primes are distributed among large integers.
If \(\pi(x)\) counts the primes less than or equal to \(x\), then:
\[ \pi(x)\sim\frac{x}{\ln x} \]
This means the proportion of integers that are prime generally decreases as the numbers become larger.
It does not mean prime numbers eventually stop appearing.
How to Find Prime Numbers Using the Sieve of Eratosthenes
The Sieve of Eratosthenes is an ancient mathematical method for finding all prime numbers up to a chosen limit.
It is named after Eratosthenes, who lived during the third century BCE.
Instead of testing each number individually, the method systematically eliminates multiples of known primes. xlinux.nist.gov+1
Step-by-Step Example: Finding Primes Up to 100
- Write all integers from 2 through 100.
- Keep 2 and cross out its multiples greater than 2.
- Keep 3 and cross out its multiples greater than 3.
- Keep 5 and cross out its multiples greater than 5.
- Keep 7 and cross out its multiples greater than 7.
- Stop because the next remaining number, 11, exceeds the square root of 100.
All remaining uncrossed numbers are prime.
Interactive Sieve of Eratosthenes
Explore how composite numbers are eliminated.
Numbers 1–100
Step 0 of 4
1
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Remaining primes (after step 4)
Excluded numbers
Start with the integers from 2 to 100. Number 1 is excluded.
PreviousCross out multiples of 2
This approach is particularly useful when finding many primes within a fixed range. It also provides a visual explanation of why composite numbers have smaller prime factors.
Prime Factorization: Breaking Numbers Into Prime Factors
Prime factorization means expressing a composite number as a product of prime numbers.
For example:
\[ 24=2\times2\times2\times3 \]
Using exponents:
\[ 24=2^3\times3 \]
The prime factors of 24 are 2 and 3.
How to Find Prime Factors Using Division
Consider the number 84.
Divide by the smallest prime that divides it exactly:
\[ 84\div2=42 \]
Continue dividing:
\[ 42\div2=21 \]
Then:
\[ 21\div3=7 \]
Because 7 is prime, the factorization is complete.
Therefore:
\[ \boxed{84=2^2\times3\times7} \]
Prime Factorization Examples
| Number | Prime factorization |
|---|---|
| 12 | \(2^2\times3\) |
| 18 | \(2\times3^2\) |
| 36 | \(2^2\times3^2\) |
| 48 | \(2^4\times3\) |
| 72 | \(2^3\times3^2\) |
| 100 | \(2^2\times5^2\) |
| 120 | \(2^3\times3\times5\) |
Why Is Prime Factorization Useful?
Prime factorization helps calculate the greatest common factor (GCF), also called the greatest common divisor (GCD), and the least common multiple (LCM).
For example, consider 24 and 36.
\[ 24=2^3\times3 \]
\[ 36=2^2\times3^2 \]
For the GCF, take the lowest exponent of each shared prime:
\[ \operatorname{GCF}(24,36)=2^2\times3=12 \]
For the LCM, take the highest exponent of every prime appearing in either factorization:
\[ \operatorname{LCM}(24,36)=2^3\times3^2=72 \]
These methods are useful for simplifying fractions, finding common denominators, and solving divisibility problems.
Different Types of Prime Numbers
Mathematicians classify certain primes according to their relationships with other numbers or their algebraic forms.
Twin Prime Numbers
Twin primes are pairs of prime numbers whose difference is exactly 2.
Examples include:
- (3, 5)
- (5, 7)
- (11, 13)
- (17, 19)
- (29, 31)
- (41, 43)
A famous unsolved problem, the Twin Prime Conjecture, asks whether infinitely many twin-prime pairs exist.
Although mathematicians have made progress in understanding bounded gaps between primes, the conjecture remains unproved. MathWorld
Mersenne Prime Numbers
A Mersenne prime is a prime number of the form:
\[ M_p=2^p-1 \]
where \(p\) is itself prime.
Examples include:
| Exponent \(p\) | \(2^p-1\) | Prime? |
|---|---|---|
| 2 | 3 | Yes |
| 3 | 7 | Yes |
| 5 | 31 | Yes |
| 7 | 127 | Yes |
| 11 | 2047 | No |
| 13 | 8191 | Yes |
Notice that a prime exponent does not guarantee a Mersenne prime.
For instance:
\[ 2047=23\times89 \]
Mersenne primes are especially important in computational number theory and the search for exceptionally large primes.
Fermat Prime Numbers
Fermat numbers have the form:
\[ F_n=2^{2^n}+1 \]
where \(n\) is a nonnegative integer.
The first five Fermat numbers are prime:
3, 5, 17, 257, and 65,537.
However, not all Fermat numbers are prime. For example:
\[ F_5=4294967297 \]
and:
\[ 4294967297=641\times6700417 \]
The study of Fermat primes connects number theory with geometric constructions and the history of mathematics.
Sophie Germain Prime Numbers
A prime \(p\) is called a Sophie Germain prime when \(2p+1\) is also prime.
For example, 11 is a Sophie Germain prime because:
\[ 2(11)+1=23 \]
Both 11 and 23 are prime.
The associated number \(2p+1\) is called a safe prime.
Palindromic Prime Numbers
A palindromic prime reads the same forward and backward.
Examples include 11, 101, 131, 151, and 181.
Not every palindrome is prime. For example, 121 is a palindrome but is composite because:
\[ 121=11^2 \]
In fact, 11 is the only palindromic prime with an even number of decimal digits.
Why Are Prime Numbers Important in Real Life?
Although prime numbers are introduced in elementary mathematics, their applications extend into advanced computing, cybersecurity, and scientific research.
Cryptography and Internet Security
Prime numbers are central to several public-key cryptographic systems.
One well-known example is RSA cryptography, named after Ron Rivest, Adi Shamir, and Leonard Adleman.
RSA uses a modulus formed by multiplying two large prime numbers:
\[ n=p\times q \]
The difficulty of factoring suitably chosen large integers helps support RSA’s security when it is implemented with appropriate key sizes and modern padding.
Not every encryption system uses prime factorization. Other cryptographic techniques rely on different mathematical problems.
Computer Science and Algorithms
Prime numbers appear in:
- Hash table design and modular arithmetic
- Pseudorandom number generation
- Error-detecting and error-correcting mathematics
- Primality-testing algorithms
- Computational number theory
For instance, modular arithmetic uses the remainder after division by a chosen modulus. Prime moduli are useful because they create particularly convenient algebraic structures.
Mathematical Research
Prime numbers also appear in some of mathematics’ most difficult unsolved problems.
The Riemann Hypothesis concerns the zeros of the Riemann zeta function and has deep connections to the distribution of primes.
Another famous problem, Goldbach’s Conjecture, proposes that every even integer greater than 2 can be written as the sum of two prime numbers.
Examples include:
\[ 10=3+7 \]
\[ 20=7+13 \]
\[ 50=19+31 \]
Despite extensive computational verification, Goldbach’s conjecture has not been proved for all even integers.
Common Mistakes When Learning Prime Numbers
Several misunderstandings appear frequently in elementary mathematics.
Mistake 1: Treating 1 as Prime
The number 1 has only one distinct positive factor. Therefore, it does not satisfy the definition of a prime.
Mistake 2: Assuming Every Odd Number Is Prime
Numbers such as 9, 15, 21, 25, and 27 are odd but composite.
Oddness alone does not establish primality.
Mistake 3: Forgetting That 2 Is Prime
Two is the smallest prime number and the only even prime.
Mistake 4: Assuming Every Number Ending in 1, 3, 7, or 9 Is Prime
Every prime greater than 5 ends in one of these digits in base 10, but the reverse is not true.
For example, 21, 33, 49, and 91 are composite.
Mistake 5: Confusing Prime Factors With All Factors
Consider 30.
Its positive factors are:
1, 2, 3, 5, 6, 10, 15, and 30.
Its distinct prime factors are only:
2, 3, and 5.
The difference matters when working with prime factorization and divisibility.
Practice Questions on Prime Numbers
Test your understanding with these short exercises.
Prime numbers knowledge check
0 of 5 answered
1. Which of these numbers is prime?21293339
2. What is the only even prime number?0246
3. Which number is neither prime nor composite?1379
4. What is the prime factorization of 45?3 × 155 × 93² × 52 × 3 × 5
5. Which pair contains twin primes?7 and 1111 and 1313 and 1717 and 23
Check answers
Try again
Final Thoughts on Prime Numbers
Prime numbers are positive integers greater than 1 with exactly two distinct positive factors. The first five are 2, 3, 5, 7, and 11, and there are infinitely many more.
Understanding prime numbers makes it easier to recognize factors, simplify fractions, calculate the GCF and LCM, and explore more advanced mathematical ideas.
The most useful starting point is to learn the 25 primes from 1 to 100, practice checking divisibility up to a number’s square root, and use prime factorization to break composite numbers into their fundamental components.

