TExcelTAD
Home › School Integers, Rational Numbers & Proportions › Prime vs. Composite Numbers and Sieve of Eratosthenes

Prime vs. Composite Numbers and Sieve of Eratosthenes

Every whole number greater than 11 is built out of fundamental arithmetic building blocks called prime numbers. Understanding the distinction between prime and composite numbers allows us to simplify fractions, factor expressions, and find common multiples with ease.

In this lesson, you will learn the exact paper definitions of primes and composites, master the historic Sieve of Eratosthenes method, and learn how to test whether any two- or three-digit number is prime using the square root stopping rule.


1. Concepts & Paper Visuals

Exact Mathematical Definitions

Every positive integer falls into one of three distinct categories:

  1. The Number 1 (The Unit):

    • 11 has exactly one positive divisor: itself (1÷1=11 \div 1 = 1).
    • Therefore, 11 is neither prime nor composite.
  2. Prime Numbers:

    • A whole number strictly greater than 11 that has exactly two distinct positive divisors: 11 and itself.
    • First few primes: 2,3,5,7,11,13,17,19,23,29,…2, 3, 5, 7, 11, 13, 17, 19, 23, 29, \dots
  3. Composite Numbers:

    • A whole number strictly greater than 11 that has more than two positive divisors.
    • A composite number can always be broken down into a product of smaller whole numbers greater than 11.
    • First few composites: 4,6,8,9,10,12,14,15,16,18,…4, 6, 8, 9, 10, 12, 14, 15, 16, 18, \dots
NumberAll Positive DivisorsDivisor CountClassification111Neither prime nor composite21,22Prime (the only even prime)31,32Prime41,2,43Composite (2×2)51,52Prime61,2,3,64Composite (2×3)71,72Prime81,2,4,84Composite (2×4)91,3,93Composite (3×3)\begin{array}{|c|c|c|c|} \hline \textbf{Number} & \textbf{All Positive Divisors} & \textbf{Divisor Count} & \textbf{Classification} \\ \hline 1 & 1 & 1 & \text{Neither prime nor composite} \\ 2 & 1, 2 & 2 & \text{Prime (the only even prime)} \\ 3 & 1, 3 & 2 & \text{Prime} \\ 4 & 1, 2, 4 & 3 & \text{Composite } (2 \times 2) \\ 5 & 1, 5 & 2 & \text{Prime} \\ 6 & 1, 2, 3, 6 & 4 & \text{Composite } (2 \times 3) \\ 7 & 1, 7 & 2 & \text{Prime} \\ 8 & 1, 2, 4, 8 & 4 & \text{Composite } (2 \times 4) \\ 9 & 1, 3, 9 & 3 & \text{Composite } (3 \times 3) \\ \hline \end{array}

Why is 2 Unique?

22 is the very first prime number and the only even prime number.

Every other even number ends in 0,2,4,6,0, 2, 4, 6, or 88, which means it is divisible by 22. Since an even number 2k2k (for k>1k > 1) has at least three divisors (1,2,1, 2, and 2k2k), all even numbers greater than 22 are composite.


The Sieve of Eratosthenes on Paper

Invented over 2,2002{,}200 years ago by the Greek mathematician Eratosthenes of Cyrene, this systematic paper method filters out composite numbers by crossing out multiples, leaving only the pure primes.

Here is how the Sieve works for numbers from 11 to 5050:

1(2)(3)4(5)6(7)8910(11)12(13)141516(17)18(19)202122(23)2425262728(29)30(31)3233343536(37)383940(41)42(43)444546(47)484950\begin{array}{rrrrrrrrrr} \cancel{1} & \mathbf{(2)} & \mathbf{(3)} & \cancel{4} & \mathbf{(5)} & \cancel{6} & \mathbf{(7)} & \cancel{8} & \cancel{9} & \cancel{10} \\ \mathbf{(11)} & \cancel{12} & \mathbf{(13)} & \cancel{14} & \cancel{15} & \cancel{16} & \mathbf{(17)} & \cancel{18} & \mathbf{(19)} & \cancel{20} \\ \cancel{21} & \cancel{22} & \mathbf{(23)} & \cancel{24} & \cancel{25} & \cancel{26} & \cancel{27} & \cancel{28} & \mathbf{(29)} & \cancel{30} \\ \mathbf{(31)} & \cancel{32} & \cancel{33} & \cancel{34} & \cancel{35} & \cancel{36} & \mathbf{(37)} & \cancel{38} & \cancel{39} & \cancel{40} \\ \mathbf{(41)} & \cancel{42} & \mathbf{(43)} & \cancel{44} & \cancel{45} & \cancel{46} & \mathbf{(47)} & \cancel{48} & \cancel{49} & \cancel{50} \end{array}

Step-by-Step Paper Sieve Rules:

  1. Cross out 1: 11 is not prime.
  2. Circle 2: 22 is prime. Cross out all remaining multiples of 22 (4,6,8,10,…4, 6, 8, 10, \dots).
  3. Circle 3: 33 is prime. Cross out all remaining multiples of 33 (9,15,21,27,33,…9, 15, 21, 27, 33, \dots). (Note: multiples like 6,126, 12 are already crossed out by 22).
  4. Circle 5: 55 is prime. Cross out all remaining multiples of 55 ending in 55 (25,3525, 35).
  5. Circle 7: 77 is prime. Cross out all remaining multiples of 77 (7×7=497 \times 7 = 49).
  6. Stop! All remaining uncrossed numbers are prime!

The 1515 prime numbers up to 5050 are:

2,  3,  5,  7,  11,  13,  17,  19,  23,  29,  31,  37,  41,  43,  472, \; 3, \; 5, \; 7, \; 11, \; 13, \; 17, \; 19, \; 23, \; 29, \; 31, \; 37, \; 41, \; 43, \; 47

2. The Square Root Stopping Rule

How do we test whether a single large number NN is prime without checking every integer up to NN?

The Square Root Principle: If a whole number NN is composite, it must have at least one prime factor pp such that:

p≤Np \le \sqrt{N}

Why Does This Work?

If N=a×bN = a \times b, both factors cannot be greater than N\sqrt{N}. If both were greater than N\sqrt{N}, their product would exceed NN:

a>Nandb>N  ⟹  a×b>N×N=Na > \sqrt{N} \quad \text{and} \quad b > \sqrt{N} \implies a \times b > \sqrt{N} \times \sqrt{N} = N

Therefore, at least one factor must be less than or equal to N\sqrt{N}. If you test all prime numbers up to N\sqrt{N} and none divide NN, then NN is guaranteed to be prime!


3. Step-by-Step Notebook Examples

Example 1: Testing if 97 is Prime

Problem: Test whether 9797 is a prime or composite number on paper.

  • Step 1: Estimate N\sqrt{N}:
    92=81and102=1009^2 = 81 \quad \text{and} \quad 10^2 = 100
    Since 81<97<10081 < 97 < 100, we know:
    9<97<10  ⟹  97≈9.89 < \sqrt{97} < 10 \implies \sqrt{97} \approx 9.8
  • Step 2: List all primes ≤97\le \sqrt{97}: The primes to test are only:
    2,  3,  5,  72, \; 3, \; 5, \; 7
  • Step 3: Test divisibility on paper:
    • Test 2: 9797 is odd   ⟹  \implies NOT divisible by 22.
    • Test 3: Digit sum 9+7=169 + 7 = 16. Since 16÷3=5 R 1  ⟹  16 \div 3 = 5\text{ R }1 \implies NOT divisible by 33.
    • Test 5: Last digit is 77 (not 00 or 55)   ⟹  \implies NOT divisible by 55.
    • Test 7: Paper division: 97÷7=13 R 697 \div 7 = 13\text{ R }6 (since 7×13=917 \times 13 = 91)   ⟹  \implies NOT divisible by 77.
  • Conclusion: None of the primes up to 97\sqrt{97} divide 9797.
  • Final Answer: 9797 is a prime number.

Example 2: Testing the Infamous "Exam Traps" (91 and 51)

Problem: Classify 5151 and 9191 as prime or composite.

Testing 5151:

  • Check digit sum: 5+1=65 + 1 = 6.
  • Since 66 is divisible by 33, 5151 is divisible by 33:
    51÷3=17  ⟹  51=3×1751 \div 3 = 17 \implies 51 = 3 \times 17
  • Divisors of 5151: 1,3,17,511, 3, 17, 51 (four divisors).
  • 5151 is a composite number.

Testing 9191:

  • 91<10\sqrt{91} < 10, so test primes 2,3,5,72, 3, 5, 7:
    • 22: 9191 is odd (No).
    • 33: 9+1=109 + 1 = 10, not divisible by 33 (No).
    • 55: Ends in 11 (No).
    • 77: Test short division on paper:
      91÷7=13(remainder 0)91 \div 7 = 13 \quad (\text{remainder } 0)
  • Since 7×13=917 \times 13 = 91, 9191 has divisors 1,7,13,911, 7, 13, 91.
  • 9191 is a composite number.

Example 3: Testing a Three-Digit Number (173)

Problem: Determine whether 173173 is prime.

  • Step 1: Estimate 173\sqrt{173}:
    132=169and142=19613^2 = 169 \quad \text{and} \quad 14^2 = 196
    Since 169<173<196169 < 173 < 196, we have 173≈13.15\sqrt{173} \approx 13.15.
  • Step 2: List primes ≤13\le 13:
    2,  3,  5,  7,  11,  132, \; 3, \; 5, \; 7, \; 11, \; 13
  • Step 3: Test each prime:
    • 22: Odd   ⟹  \implies No.
    • 33: 1+7+3=111 + 7 + 3 = 11, not divisible by 3  ⟹  3 \implies No.
    • 55: Ends in 3  ⟹  3 \implies No.
    • 77: 173÷7=24 R 5173 \div 7 = 24\text{ R }5 (since 7×24=1687 \times 24 = 168)   ⟹  \implies No.
    • 1111: Alternating sum 1−7+3=−31 - 7 + 3 = -3, not divisible by 1111 (11×15=165,173−165=811 \times 15 = 165, 173 - 165 = 8)   ⟹  \implies No.
    • 1313: 173÷13=13 R 4173 \div 13 = 13\text{ R }4 (since 13×13=16913 \times 13 = 169)   ⟹  \implies No.
  • Conclusion: 173173 is not divisible by any prime up to 173\sqrt{173}.
  • Final Answer: 173173 is a prime number.

4. Common Mistakes & Paper Traps

[!WARNING] Trap 1: Classifying 1 as a prime number. This is the single most common error in school mathematics. By definition, a prime number must have exactly two distinct positive divisors. The number 11 only has one divisor (11), so it cannot be prime.

[!WARNING] Trap 2: Assuming all odd numbers are prime. While all primes except 22 are odd, the converse is false. Many odd numbers are composite: 9,15,21,25,27,33,35,49,51,91,…9, 15, 21, 25, 27, 33, 35, 49, 51, 91, \dots

[!WARNING] Trap 3: Testing composite numbers during prime tests. When testing if NN is prime, students often waste time dividing by 4,6,8,9,104, 6, 8, 9, 10.

  • If NN is not divisible by 22, it cannot be divisible by 4,6,84, 6, 8.
  • If NN is not divisible by 33, it cannot be divisible by 99.
  • Only test prime divisors: 2,3,5,7,11,…2, 3, 5, 7, 11, \dots

5. Pencil & Paper Practice

Classify each number as Prime, Composite, or Neither using pencil and paper:

  1. Practice 1: 11
  2. Practice 2: 8787
  3. Practice 3: 101101

6. Worked Solutions for Practice Problems

Solution to Practice 1

  • Divisors of 11: only 11.
  • A prime requires exactly two distinct divisors.
  • 11 is NEITHER prime nor composite.

Solution to Practice 2

  • Number: 8787.
  • Test divisibility by 33: sum of digits is 8+7=158 + 7 = 15.
  • Since 1515 divides by 33, 8787 divides by 33:
    87÷3=29  ⟹  87=3×2987 \div 3 = 29 \implies 87 = 3 \times 29
  • 8787 is COMPOSITE.

Solution to Practice 3

  • Number: 101101.
  • 101≈10.05\sqrt{101} \approx 10.05 (102=10010^2 = 100). Primes ≤10\le 10: 2,3,5,72, 3, 5, 7.
    • Divisible by 22? No (odd).
    • Divisible by 33? Sum =1+0+1=2= 1+0+1 = 2 (No).
    • Divisible by 55? Ends in 11 (No).
    • Divisible by 77? 101÷7=14 R 3101 \div 7 = 14\text{ R }3 (7×14=987 \times 14 = 98) (No).
  • Tested all primes ≤101\le \sqrt{101} with none dividing evenly.
  • 101101 is PRIME.

7. Summary

  • Prime: Exactly two distinct positive divisors (11 and itself).
  • Composite: More than two positive divisors (can be factored into smaller primes).
  • 11 is neither prime nor composite.
  • 22 is the smallest and only even prime.
  • Square Root Rule: To test if NN is prime, test only prime divisors p≤Np \le \sqrt{N}. If none divide NN, NN is prime.

Test yourself

Why is the number 11 NOT classified as a prime number?

  1. Because it is an odd number
  2. Because a prime number must have exactly two distinct positive divisors, but 11 has only one divisor
  3. Because it can be divided by any whole number
  4. Because it is smaller than 22

Which of the following numbers is COMPOSITE?

  1. 4343
  2. 4747
  3. 5151
  4. 5353

To determine whether 149149 is prime on paper, what is the largest prime divisor you need to test?

  1. 77
  2. 1111
  3. 1313
  4. 1717