Prime Numbers: Definition, List, Examples & Rules

Prime numbers may look like ordinary counting numbers, but they have a special property: they cannot be divided evenly by any positive whole number except 1 and themselves. This simple idea makes primes fundamental to arithmetic, number theory, algorithms, and modern cryptography.

Prime numbers are natural numbers greater than 1 with exactly two positive factors: 1 and the number itself. For example, 7 is prime because its only factors are 1 and 7. In contrast, 8 is composite because it has four factors: 1, 2, 4, and 8. Khan Academy

What Are Prime Numbers?

A prime number is a positive integer greater than 1 that has exactly two positive divisors:

  • 1
  • The number itself

Consider 13. Its factors are:

1 × 13 = 13

There are no other positive whole numbers that divide 13 without leaving a remainder. Therefore, 13 is prime.

Now consider 15:

1 × 15 = 15
3 × 5 = 15

Its factors are 1, 3, 5, and 15. Because it has more than two positive factors, 15 is not prime; it is a composite number.

This distinction between primes and composites is one of the basic building blocks of arithmetic. Khan Academy

First 10 Prime Numbers

The first ten prime numbers are:

2, 3, 5, 7, 11, 13, 17, 19, 23, 29

Notice something unusual about the first number in the list: 2 is even.

In fact, 2 is the only even prime number. Every other even positive integer greater than 2 is divisible by 2, so it must have at least three factors and therefore be composite. GeeksforGeeks

Prime Numbers From 1 to 100

There are 25 prime numbers between 1 and 100: GeeksforGeeks

RangePrime Numbers
1–102, 3, 5, 7
11–2011, 13, 17, 19
21–3023, 29
31–4031, 37
41–5041, 43, 47
51–6053, 59
61–7061, 67
71–8071, 73, 79
81–9083, 89
91–10097

So the complete list is:

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.

A useful shortcut when working with this list is to eliminate even numbers greater than 2 first. You can then apply divisibility rules for small primes such as 3, 5, and 7.

Prime Numbers vs. Composite Numbers

The difference between a prime and composite number comes down to the number of positive factors it has.

PropertyPrime NumberComposite Number
Greater than 1YesYes
Number of positive factorsExactly 2More than 2
Divisible by 1YesYes
Divisible by itselfYesYes
Has other positive factorsNoYes
Examples2, 3, 5, 7, 114, 6, 8, 9, 10

For example:

7 is prime

Factors: 1, 7

12 is composite

Factors: 1, 2, 3, 4, 6, 12

This is why simply checking whether a number is odd is not enough. Although most prime numbers are odd, many odd numbers are composite.

For instance, 9, 15, 21, 25, and 27 are all odd, but none is prime.

Is 1 a Prime Number?

No. 1 is neither prime nor composite.

A prime must have exactly two distinct positive factors. The number 1 has only one positive factor—1 itself—so it does not satisfy the definition. MathWorld

This convention is also essential for keeping prime factorization unique.

Is 0 a Prime Number?

No.

Zero has far more than two divisors in the relevant sense: every nonzero integer divides 0 evenly because, for example:

0 ÷ 2 = 0
0 ÷ 5 = 0

It therefore does not meet the definition of a prime number.

Is 2 a Prime Number?

Yes. The factors of 2 are exactly:

1 and 2

That makes 2 prime. It is also the smallest prime number and the only even prime. GeeksforGeeks

How to Check Whether a Number Is Prime

For small numbers, the easiest approach is to look for factors.

Suppose you want to determine whether 37 is prime.

You could test possible divisors:

  • 37 is not even, so it is not divisible by 2.
  • Its digits add to 10, so it is not divisible by 3.
  • It does not end in 0 or 5, so it is not divisible by 5.

No smaller prime factor works, so 37 is prime.

For larger numbers, there is a more efficient rule.

The Square Root Method

To determine whether an integer \(n\) is prime, you only need to test possible prime divisors up to:

√n

Why?

If a composite number can be written as:

n = a × b

then at least one of those factors must be less than or equal to √n. If both were larger than √n, their product would exceed n.

Consider 97.

√97 is approximately 9.85.

You therefore only need to test the prime numbers up to 9.85:

2, 3, 5, and 7

97 is not divisible by any of them, so 97 is prime.

Trial division based on possible factors is a standard method for checking small numbers. MathWorld

Quick Divisibility Checks

Before doing lengthy calculations, use basic divisibility rules.

Divisible by 2:
The last digit is 0, 2, 4, 6, or 8.

Divisible by 3:
The sum of the digits is divisible by 3.

For 123:

1 + 2 + 3 = 6

Since 6 is divisible by 3, 123 is composite.

Divisible by 5:
The number ends in 0 or 5.

These simple checks quickly eliminate many candidates.

How to Find Multiple Prime Numbers

Testing one number at a time works well for small problems. But suppose you need every prime number up to 100, 1,000, or even higher.

A classic method is the Sieve of Eratosthenes.

Sieve of Eratosthenes

The Sieve of Eratosthenes is an ancient algorithm for generating primes up to a chosen limit. Instead of testing every number independently, it repeatedly eliminates multiples of known primes. Wikipedia

To find primes up to 30:

  1. Write the integers from 2 through 30.
  2. Keep 2 and cross out its multiples greater than 2.
  3. Move to 3 and cross out its remaining multiples greater than 3.
  4. Move to 5 and eliminate its remaining multiples.
  5. Continue until further checking is unnecessary.

The numbers left are:

2, 3, 5, 7, 11, 13, 17, 19, 23, 29

This approach is particularly useful when you want all primes within a range rather than checking just one integer.

Important Properties of Prime Numbers

Prime numbers follow several useful rules.

1. The Smallest Prime Is 2

There is no prime smaller than 2 because 1 is neither prime nor composite.

2. Two Is the Only Even Prime

Any even integer greater than 2 can be divided by 2, giving it an additional factor.

3. There Are Infinitely Many Primes

There is no largest possible prime number.

Euclid established more than two thousand years ago that there must be infinitely many primes. MathWorld

A simplified idea behind the classic argument is to suppose there were only finitely many primes. Multiply all of them together and add 1. The resulting number cannot be divisible evenly by any prime on the supposed complete list, which leads to a contradiction.

4. Every Integer Greater Than 1 Is Prime or Composite

An integer such as 17 is prime.

An integer such as 18 is composite.

The number 1 is the special exception: it belongs to neither category.

5. Every Integer Greater Than 1 Has a Prime Factorization

Every positive integer greater than 1 can be expressed uniquely as a product of primes, apart from the order in which the factors are written. This result is called the Fundamental Theorem of Arithmetic. MathWorld

For example:

60 = 2 × 2 × 3 × 5

or:

60 = 2² × 3 × 5

Those prime factors form the fundamental multiplicative structure of 60.

Prime Factorization Explained

Prime factorization means breaking a composite number down until every factor is prime.

Take 84.

Start by dividing by 2:

84 = 2 × 42

Then:

42 = 2 × 21

And:

21 = 3 × 7

Therefore:

84 = 2 × 2 × 3 × 7

Using exponents:

84 = 2² × 3 × 7

You cannot break 2, 3, or 7 into smaller positive integer factors other than 1 and themselves.

Factor Tree Example

Another common technique is a factor tree.

For 72:

72 = 8 × 9
8 = 2 × 4
4 = 2 × 2
9 = 3 × 3

Therefore:

72 = 2 × 2 × 2 × 3 × 3

or:

72 = 2³ × 3²

Prime factorization is useful for finding greatest common factors, least common multiples, simplifying fractions, and solving many number-theory problems.

Prime Numbers and Coprime Numbers Are Different

A common mistake is to assume that “prime” and “coprime” mean the same thing.

They do not.

A prime number has exactly two positive factors.

Two integers are coprime or relatively prime when their greatest common divisor is 1.

For example:

8 and 15 are coprime.

Neither number is prime:

8 = 2³
15 = 3 × 5

But they share no prime factor, so:

GCD(8, 15) = 1

Therefore, they are coprime.

This shows that two numbers do not need to be individually prime to be relatively prime to each other.

Different Types and Patterns of Prime Numbers

As mathematicians study primes, several interesting categories appear.

Twin Primes

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

Mathematicians still do not know whether infinitely many twin-prime pairs exist. This unresolved question is known as the twin prime conjecture. MathWorld

Mersenne Primes

A Mersenne number has the form:

2ᵖ − 1

When the result is prime, it is called a Mersenne prime.

Examples include:

2² − 1 = 3
2³ − 1 = 7
2⁵ − 1 = 31
2⁷ − 1 = 127

Not every prime exponent produces a Mersenne prime, but the exponent must itself be prime if \(2^p-1\) is prime. MathWorld

Large Mersenne primes are particularly important in computational searches for enormous prime numbers.

Prime Gaps

A prime gap is the difference between consecutive prime numbers.

For example:

11 and 13 have a gap of 2.

23 and 29 have a gap of 6.

Prime gaps do not stay constant. As numbers become larger, primes become less dense overall, even though primes never run out.

Common Mistakes When Identifying Prime Numbers

Understanding the definition prevents most mistakes.

Mistake 1: Treating 1 as Prime

Prime numbers need exactly two positive factors. One has only one.

Mistake 2: Assuming Every Odd Number Is Prime

Consider:

21 = 3 × 7

It is odd but composite.

Mistake 3: Thinking 2 Is Composite Because It Is Even

Two is the exception. Its only positive factors are 1 and 2, so it is prime.

Mistake 4: Checking Every Number Up to n

When manually testing whether n is prime, you do not need to test every possible divisor below n. Checking prime divisors through √n is sufficient.

Mistake 5: Confusing Factors With Multiples

Factors divide a number exactly.

Multiples are produced by multiplying that number by integers.

For 7:

Factors: 1, 7

Some multiples: 7, 14, 21, 28, 35…

Keeping these concepts separate makes prime-number problems much easier.

Why Are Prime Numbers Important?

Primes are often described as the building blocks of positive integers because composite numbers can be decomposed into prime factors.

For example:

12 = 2² × 3
30 = 2 × 3 × 5
100 = 2² × 5²

This unique factorization is foundational in number theory. MathWorld

But primes are not limited to classroom arithmetic.

Mathematics and Number Theory

Prime numbers appear throughout number theory in topics involving:

  • divisibility
  • modular arithmetic
  • greatest common divisors
  • Diophantine equations
  • prime distribution
  • algebraic structures

Their distribution is irregular enough to create difficult mathematical questions, yet regular enough to obey deep statistical laws.

Computer Science and Algorithms

Computer programs often need to identify primes, generate primes, or factor integers.

Methods range from simple trial division to sieves and sophisticated primality-testing algorithms. Approaches commonly discussed in computational contexts include Fermat-based tests and deterministic algorithms such as AKS. GeeksforGeeks

Cryptography

Prime numbers also have major applications in cryptography.

Many public-key cryptographic systems rely on number-theoretic problems involving large integers and primes. In systems such as RSA, large primes are used to construct keys, while security depends on mathematical operations that are computationally difficult to reverse without the appropriate private information.

This is one reason research into efficient primality testing and integer factorization has practical importance far beyond pure mathematics.

How Prime Numbers Become Less Common

Primes continue forever, but they become less frequent as numbers grow.

The Prime Number Theorem describes this long-term distribution. Roughly speaking, the number of primes less than a large number \(x\) is approximated by:

x / ln(x)

where ln(x) is the natural logarithm.

This does not predict exactly where the next prime will appear. Instead, it describes how densely primes are distributed among increasingly large integers. GeeksforGeeks

For students, the important distinction is:

There are infinitely many prime numbers, but their proportion among positive integers gradually decreases as the numbers get larger.

Solved Prime Number Examples

Working through examples is one of the fastest ways to understand primes.

Example 1: Is 29 a Prime Number?

√29 is approximately 5.39.

Check the relevant primes up to that value:

29 is not divisible by 2.
29 is not divisible by 3.
29 is not divisible by 5.

Therefore, 29 is prime.

Example 2: Is 51 Prime?

Add its digits:

5 + 1 = 6

Six is divisible by 3, so 51 is divisible by 3:

51 = 3 × 17

Therefore, 51 is composite.

Example 3: Is 91 Prime?

√91 is approximately 9.54.

Test small primes:

91 is not divisible by 2, 3, or 5.

But:

91 ÷ 7 = 13

Therefore:

91 = 7 × 13

So 91 is composite.

Example 4: What Are the Prime Numbers Between 20 and 40?

Check the integers in that range.

The primes are:

23, 29, 31, 37. GeeksforGeeks

Example 5: Find the Prime Factorization of 60

Start with the smallest prime divisor:

60 ÷ 2 = 30
30 ÷ 2 = 15
15 ÷ 3 = 5

Five is already prime.

Therefore:

60 = 2² × 3 × 5. GeeksforGeeks

Key Facts to Remember About Prime Numbers

If you need a quick review, remember these rules:

  • A prime is a natural number greater than 1.
  • It has exactly two positive factors: 1 and itself.
  • The smallest prime is 2.
  • Two is the only even prime.
  • One is neither prime nor composite.
  • Every composite integer greater than 1 can be broken into prime factors.
  • There are infinitely many primes.
  • To test a number efficiently by trial division, checking possible prime factors up to its square root is enough.
  • The Sieve of Eratosthenes is an efficient classical method for generating many primes within a range.
  • Prime numbers play major roles in number theory, algorithms, and cryptography.

Final Thoughts

Prime numbers are integers greater than 1 that have exactly two positive factors: 1 and themselves. Numbers such as 2, 3, 5, 7, 11, and 13 satisfy this rule, while numbers such as 4, 6, 8, 9, and 10 are composite.

Once you understand factors, the concept becomes straightforward. Start with small numbers, learn the basic divisibility rules, then use the square-root method or Sieve of Eratosthenes for larger problems. Those skills provide a strong foundation for prime factorization, number theory, algorithms, and more advanced mathematics.

A
Written & Reviewed By

Dr. Alexandra Reed

Reviews and publishes educational physics content focused on accuracy, conceptual clarity, and student learning. Specializes in physics fundamentals, formulas, equations, problem-solving methods, and academic study resources designed to support high school, college, and competitive exam learners.

Latest Physics Articles