Tropical beach

prime numbers: Definition, List, Examples & Tricks

Why is 7 a prime number but 9 is not? Both are odd, yet they behave differently when divided by other whole numbers. Understanding that difference is the key to recognizing prime numbers and solving many common math problems.

Prime numbers are natural numbers greater than 1 that have exactly two distinct positive factors: 1 and the number itself. Examples include 2, 3, 5, 7, 11, and 13. The number 2 is the only even prime, while 1 is neither prime nor composite. There are infinitely many primes.

Prime numbers are fundamental to arithmetic, number theory, fractions, and even modern computer security. Once you understand factors and divisibility, finding them becomes much easier.

What Are prime numbers in Mathematics?

A prime number is a positive integer greater than 1 that cannot be divided evenly by any positive integer other than 1 and itself.

For example, consider the number 7.

Its positive factors are:

– 1 × 7 = 7

There are no other pairs of positive whole numbers whose product is 7. Therefore, 7 is prime.

Now consider 12:

  • 1 × 12 = 12
  • 2 × 6 = 12
  • 3 × 4 = 12

Because 12 has more than two positive factors, it is a composite number.

Mathematically, a natural number \(p\) is prime when:

\[ p>1 \]

and its only positive divisors are 1 and \(p\).

This definition is the foundation of primality testing and prime factorization. Mathematics LibreTexts+1

Examples of prime and composite numbers

NumberPositive factorsClassification
21, 2Prime
31, 3Prime
41, 2, 4Composite
51, 5Prime
71, 7Prime
91, 3, 9Composite
111, 11Prime
151, 3, 5, 15Composite
171, 17Prime
211, 3, 7, 21Composite

The easiest rule to remember is that a prime number has exactly two positive factors, while a composite number has more than two.

List of prime numbers From 1 to 100

There are exactly 25 prime numbers between 1 and 100, including the endpoints of the range.

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.

The smallest prime number is 2, and the largest prime below 100 is 97. Cuemath+1

Prime number chart from 1 to 100

In this chart, highlighted numbers are prime.

Prime Number Chart

Prime

Not prime

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

25 prime numbers and 75 numbers that are not prime, including 1.

Prime numbers grouped by range

RangePrime numbersCount
1–102, 3, 5, 74
11–2011, 13, 17, 194
21–3023, 292
31–4031, 372
41–5041, 43, 473
51–6053, 592
61–7061, 672
71–8071, 73, 793
81–9083, 892
91–100971
Total25

Memorizing the first 25 primes can be useful for school mathematics, but understanding how to identify them is more valuable than memorization alone.

First 10 prime numbers

The first ten prime numbers are:

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

Their sum is:

\[ 2+3+5+7+11+13+17+19+23+29=129 \]

Their average is:

\[ \frac{129}{10}=12.9 \]

These numbers frequently appear in introductory mathematics exercises.

How to Find prime numbers Step by Step

There are several methods for identifying primes. The most useful approach for small and medium-sized numbers is checking divisibility.

Method 1: Check the factors

To determine whether a number is prime:

  1. Make sure the number is greater than 1.
  2. Check whether it is divisible by 2.
  3. Test other possible factors.
  4. If no divisor other than 1 and itself exists, the number is prime.

For example, is 19 prime?

  • 19 is greater than 1.
  • It is not divisible by 2.
  • It is not divisible by 3.
  • No other possible prime divisor needs checking because the square root of 19 is less than 5.

Therefore, 19 is prime.

Method 2: Use the square root rule

You do not need to test every smaller number to determine whether an integer is prime.

If a composite number \(n\) can be written as:

\[ n=a\times b \]

then at least one of its factors must be less than or equal to \(\sqrt n\).

This means that to test whether \(n\) is prime, you only need to check prime divisors up to its square root.

For example, test 97:

\[ \sqrt{97}\approx9.85 \]

The only prime numbers below 9.85 are 2, 3, 5, and 7.

97 is not divisible by any of these numbers, so 97 is prime.

Now test 91:

\[ \sqrt{91}\approx9.54 \]

Since:

\[ 91\div7=13 \]

91 is composite.

This method is especially useful when testing numbers larger than 100.

Interactive prime number checker

Enter a whole number to test whether it is prime.Enter a positive whole number

97 is a prime number.Its only positive factors are 1 and itself.

294997101

Method 3: Use divisibility rules

Divisibility rules help eliminate composite numbers quickly.

DivisorRuleExample
2Last digit is even48
3Sum of digits is divisible by 3123
5Last digit is 0 or 575
7Subtract twice the last digit from the remaining number; repeat if needed203 → 20 − 6 = 14
11Alternating sum of digits is divisible by 11121 → 1 − 2 + 1 = 0

For example, consider 123.

The sum of its digits is:

\[ 1+2+3=6 \]

Because 6 is divisible by 3, 123 is also divisible by 3. Therefore, 123 is composite.

Divisibility rules are useful shortcuts, but a number is not necessarily prime simply because it fails one or two tests.

Sieve of Eratosthenes: Finding Multiple Primes

The Sieve of Eratosthenes is a classical algorithm for identifying all prime numbers up to a chosen limit.

It is named after Eratosthenes, an ancient Greek mathematician.

Instead of checking each number independently, the sieve eliminates multiples of known primes. xlinux.nist.gov+1

How the sieve works

To find all prime numbers from 1 to 100:

  1. Write the integers from 2 to 100.
  2. Circle 2 and cross out its multiples greater than 2.
  3. Circle 3 and cross out its multiples greater than 3.
  4. Circle 5 and cross out its multiples greater than 5.
  5. Circle 7 and cross out its multiples greater than 7.
  6. The remaining uncrossed numbers are prime.

Why stop at 7?

Because:

\[ \sqrt{100}=10 \]

The only prime numbers less than or equal to 10 are 2, 3, 5, and 7.

Every composite number up to 100 has at least one prime factor in that set.

Try the sieve yourself

Sieve of Eratosthenes

Step 0 of 4

Start with the numbers 2–100.

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

ResetCross out multiples of 2

For larger ranges, computer programs use optimized versions of sieve algorithms to generate prime number lists efficiently.

Prime Numbers vs. Composite Numbers

Prime and composite numbers are both positive integers greater than 1, but they differ in the number of positive factors they possess.

FeaturePrime numbersComposite numbers
Positive factorsExactly 2More than 2
Smallest example24
Can be factored into smaller positive integers greater than 1?NoYes
Examples3, 7, 11, 136, 8, 9, 12
Even numbersOnly 2Every even number greater than 2
Odd numbersAll primes except 2Some, such as 9 and 15

Why is 1 not a prime number?

The number 1 has only one positive factor: 1.

Since a prime number must have exactly two distinct positive factors, 1 does not qualify.

It is also not composite because composite numbers have more than two positive factors.

There is a deeper mathematical reason for this classification.

The Fundamental Theorem of Arithmetic states that every integer greater than 1 has a unique prime factorization, apart from the order of the factors.

If 1 were considered prime, factors of 1 could be inserted repeatedly into a factorization, undermining this standard uniqueness.

Is 0 a prime number?

No. Zero is neither prime nor composite.

Prime and composite numbers are defined among positive integers greater than 1, so zero falls outside both categories.

Why is 2 the only even prime?

An even number is divisible by 2.

Every even number greater than 2 therefore has at least three positive factors: 1, 2, and itself.

But 2 has only two factors:

1 and 2.

Therefore, 2 is the only even prime number.

Are all odd numbers prime?

No. Being odd does not guarantee that a number is prime.

For example:

  • 9 = 3 × 3
  • 15 = 3 × 5
  • 21 = 3 × 7
  • 25 = 5 × 5
  • 49 = 7 × 7

All these numbers are odd, but they are composite.

Prime Factorization and the Fundamental Theorem of Arithmetic

Prime factorization means expressing a positive integer greater than 1 as a product of prime numbers.

It is one of the most useful applications of primes in elementary mathematics.

For example:

\[ 12=2\times2\times3 \]

or:

\[ 12=2^2\times3 \]

Similarly:

\[ 60=2^2\times3\times5 \]

The Fundamental Theorem of Arithmetic guarantees that every integer greater than 1 has exactly one prime factorization, apart from rearranging the factors. pdvpmtasgaon.edu.in+1

How to find prime factors using a factor tree

Consider the number 84.

Start by splitting it into two factors:

\[ 84=2\times42 \]

Next:

\[ 42=2\times21 \]

And:

\[ 21=3\times7 \]

Therefore:

\[ 84=2\times2\times3\times7 \]

In exponent form:

\[ \boxed{84=2^2\times3\times7} \]

Every factor in the final expression is prime.

Prime factorization examples

NumberPrime factorization
182 × 3²
242³ × 3
362² × 3²
482⁴ × 3
722³ × 3²
1002² × 5²
1202³ × 3 × 5
1442⁴ × 3²

Using prime factors to find HCF and LCM

Prime factorization makes it easier to calculate the Highest Common Factor (HCF), also called the Greatest Common Divisor (GCD), and the Least Common Multiple (LCM).

For example, find the HCF and LCM of 24 and 36.

Their prime factorizations are:

\[ 24=2^3\times3 \]

\[ 36=2^2\times3^2 \]

For the HCF, choose the lowest exponent of each common prime:

\[ HCF=2^2\times3=12 \]

For the LCM, choose the highest exponent of each prime:

\[ LCM=2^3\times3^2=72 \]

These methods are useful for simplifying fractions, comparing quantities, and solving problems involving repeating cycles.

Interesting Properties and Types of prime numbers

Prime numbers have several mathematical properties that distinguish them from other integers.

There are infinitely many prime numbers

There is no largest prime number.

The ancient Greek mathematician Euclid demonstrated that primes are infinite.

A simplified version of his proof works as follows:

Suppose there were only finitely many primes:

\[ p_1,p_2,\ldots,p_n \]

Multiply them and add 1:

\[ N=(p_1p_2\cdots p_n)+1 \]

Dividing \(N\) by any prime in the original list leaves a remainder of 1.

Therefore, \(N\) must either be prime itself or have a prime factor missing from the list.

This contradicts the assumption that the list contained every prime.

Hence, infinitely many primes exist.

Twin prime numbers

Twin primes are pairs of prime numbers that differ by 2.

Examples include:

  • (3, 5)
  • (5, 7)
  • (11, 13)
  • (17, 19)
  • (29, 31)
  • (41, 43)
  • (59, 61)
  • (71, 73)

The Twin Prime Conjecture proposes that infinitely many twin prime pairs exist.

This remains an unsolved problem in mathematics.

Mersenne primes

A Mersenne number has the form:

\[ M_p=2^p-1 \]

where \(p\) is a positive integer, usually taken to be prime when searching for Mersenne primes.

Examples of Mersenne primes include:

\[ 2^2-1=3 \]

\[ 2^3-1=7 \]

\[ 2^5-1=31 \]

\[ 2^7-1=127 \]

However, not every number of the form \(2^p-1\) is prime, even when \(p\) is prime.

For example:

\[ 2^{11}-1=2047=23\times89 \]

Mersenne primes are important in computational number theory and searches for exceptionally large prime numbers.

Sophie Germain primes

A prime number \(p\) is called a Sophie Germain prime if \(2p+1\) is also prime.

For example, 11 is a Sophie Germain prime because:

\[ 2(11)+1=23 \]

Both 11 and 23 are prime.

Other examples include 2, 3, 5, and 23.

These numbers are named after the French mathematician Sophie Germain.

Prime numbers greater than 3 follow a useful pattern

Every prime number greater than 3 can be written in one of these forms:

\[ 6k-1\quad\text{or}\quad6k+1 \]

where \(k\) is an integer.

For example:

\[ 11=6(2)-1 \]

\[ 13=6(2)+1 \]

\[ 17=6(3)-1 \]

But the reverse is not always true.

For instance:

\[ 25=6(4)+1 \]

Yet 25 is composite.

Therefore, this pattern identifies possible primes, not guaranteed primes.

How Are prime numbers Used in Real Life?

Although primes are introduced in school arithmetic, their applications extend into computer science, cryptography, and mathematical research.

1. Cryptography and online security

Prime numbers play a major role in certain public-key cryptographic systems.

For example, the RSA cryptosystem uses mathematical operations involving large prime numbers.

A simplified explanation is:

  1. Two large prime numbers are selected.
  2. Their product becomes part of a public-key construction.
  3. The system uses properties of modular arithmetic.
  4. Recovering certain secret information from public information is computationally difficult when appropriately sized parameters and secure implementations are used.

RSA is one cryptographic technique among many; not all modern encryption relies on prime factorization.

2. Computer algorithms

Primes appear in algorithms involving:

  • Hash tables
  • Modular arithmetic
  • Randomized algorithms
  • Primality testing
  • Error-detecting and error-correcting mathematical constructions

Prime-sized moduli can help certain algorithms manage numerical patterns and distribute values.

3. Simplifying fractions

Prime factorization helps reduce fractions to their simplest form.

Consider:

\[ \frac{18}{24} \]

The prime factorizations are:

\[ 18=2\times3^2 \]

\[ 24=2^3\times3 \]

Canceling the common factors gives:

\[ \frac{18}{24}=\frac34 \]

4. Mathematical research

Prime numbers are central to number theory.

Mathematicians investigate questions such as how frequently primes occur, how far apart consecutive primes can be, and whether certain prime patterns continue infinitely.

The Prime Number Theorem describes their approximate distribution.

If \(\pi(x)\) represents the number of primes less than or equal to \(x\), then for large \(x\):

\[ \pi(x)\sim\frac{x}{\ln x} \]

Here, \(\ln x\) is the natural logarithm.

This approximation becomes increasingly accurate in relative terms as \(x\) grows, although it does not identify individual prime numbers.

The Riemann Hypothesis is another famous unsolved problem closely connected to the distribution of primes through the Riemann zeta function. research-solution.com+1

Common Mistakes When Identifying prime numbers

Several misconceptions cause mistakes in school examinations and everyday calculations.

Mistake 1: Treating 1 as prime

The number 1 has only one positive factor. It is neither prime nor composite.

Mistake 2: Assuming every odd number is prime

Odd numbers such as 9, 15, 21, and 35 are composite.

Mistake 3: Assuming every even number is composite

The number 2 is even and prime.

Mistake 4: Checking too few divisors

Consider 121.

It is not divisible by 2, 3, 5, or 7, but:

\[ 121=11\times11 \]

Therefore, 121 is composite.

The square root rule prevents this mistake by telling you how far to check.

Mistake 5: Confusing prime factors with all factors

The positive factors of 12 are:

1, 2, 3, 4, 6, 12.

Its distinct prime factors are only:

2 and 3.

Not every factor of a number is necessarily prime.

Practice Questions on prime numbers

Try these questions before checking the answers.

Test your understanding

0 of 5 answered

1. Which is the smallest prime number?1230

2. Which number is composite?17192123

3. How many primes are there from 1 to 100?20242530

4. Which is the only even prime?2468

5. Is 91 a prime number?YesNo

Final Thoughts on prime numbers

Prime numbers are the building blocks of multiplication among positive integers greater than 1. Their defining property is simple: they have exactly two distinct positive factors, 1 and themselves.

Understanding primes helps with factorization, divisibility, fractions, HCF, LCM, and more advanced mathematical concepts.

Remember these essential facts: 2 is the smallest and only even prime, 1 is not prime, there are 25 primes from 1 to 100, and the sequence of primes continues infinitely.

To strengthen your skills, practice identifying primes using divisibility rules and the square root method. Then use the Sieve of Eratosthenes to explore larger ranges and discover how prime numbers are distributed.

Elena Parker

A travel-obsessed explorer and co-founder of WayToB, she believes the best stories happen somewhere between "what if" and "let's go." From off-the-beaten-path discoveries to honest travel guides, she shares the messy, beautiful moments of chasing the world — one journey at a time.