👁 Preview — Study, Practice and Revise are open; mock tests and the rest of the syllabus unlock on subscription. Unlock all · ₹4,999
← Back to Number System
Study mode

Prime numbers

Introduction to Prime Numbers

In the vast world of numbers, some numbers play a special role because of their unique properties. Among these, prime numbers stand out as the fundamental building blocks of all natural numbers. Understanding prime numbers is essential not only in mathematics but also in competitive exams, where questions often test your ability to identify and work with primes quickly and accurately.

Prime numbers are natural numbers greater than 1 that cannot be formed by multiplying two smaller natural numbers. They are like the "atoms" of the number system because every natural number can be broken down into a product of primes in a unique way. This concept is crucial for solving many arithmetic problems efficiently.

Before diving into prime numbers, let's briefly recall where they fit in the number system hierarchy:

  • Natural Numbers: Counting numbers starting from 1, 2, 3, and so on.
  • Whole Numbers: Natural numbers including zero (0, 1, 2, 3, ...).
  • Integers: Whole numbers and their negatives (..., -3, -2, -1, 0, 1, 2, 3, ...).
  • Rational Numbers: Numbers that can be expressed as a fraction of two integers.
  • Real Numbers: All rational and irrational numbers, including decimals and roots.

Prime numbers belong to the set of natural numbers and have unique properties that distinguish them from other numbers.

Definition and Properties of Prime Numbers

A prime number is a natural number greater than 1 that has exactly two distinct positive divisors: 1 and the number itself. This means it cannot be divided evenly by any other number.

For example, consider the number 5:

  • Divisors of 5: 1 and 5 only.
  • No other number divides 5 evenly.

Therefore, 5 is a prime number.

On the other hand, a composite number is a natural number greater than 1 that has more than two divisors. For example, 6 is composite because it has divisors 1, 2, 3, and 6.

Important properties of prime numbers include:

  • Smallest prime number: 2 (the only even prime number).
  • All other prime numbers are odd.
  • Every natural number greater than 1 is either a prime or can be expressed as a product of prime numbers (called prime factorization).
  • Prime factorization is unique for each number (Fundamental Theorem of Arithmetic).
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 Number Line Highlighting Prime Numbers (Green Circles) 60 6 10 2 3 2 5 Factor Tree of 60 = 2 x 2 x 3 x 5

Methods to Identify Prime Numbers

Checking whether a number is prime can sometimes be time-consuming if done by trial division alone. However, there are several methods and rules that help us identify primes efficiently.

Divisibility Rules

These rules help quickly determine if a number is divisible by smaller numbers, which is the first step in checking primality.

  • Divisible by 2: If the last digit is even (0, 2, 4, 6, 8).
  • Divisible by 3: If the sum of digits is divisible by 3.
  • Divisible by 5: If the last digit is 0 or 5.
  • Divisible by 7: Double the last digit and subtract it from the rest of the number; if the result is divisible by 7, so is the number.
  • Divisible by 11: If the difference between the sum of digits in odd positions and even positions is 0 or divisible by 11.

Applying these rules helps eliminate many composite numbers quickly.

The Sieve of Eratosthenes

This ancient and efficient method finds all prime numbers up to a given limit by systematically "sieving out" multiples of primes.

How it works:

  1. List all numbers from 2 up to the desired limit.
  2. Start with the first prime number, 2, and cross out all its multiples.
  3. Move to the next uncrossed number (which is prime) and cross out all its multiples.
  4. Repeat until all multiples are crossed out.
  5. The remaining uncrossed numbers are primes.
graph TD    A[Start with list 2 to N] --> B[Pick first uncrossed number p]    B --> C[Cross out multiples of p]    C --> D{Are there more numbers > p?}    D -- Yes --> B    D -- No --> E[Remaining numbers are primes]

Worked Examples

Example 1: Check if 29 is a Prime Number Easy
Determine whether 29 is a prime number using divisibility rules.

Step 1: Check divisibility by 2. The last digit is 9 (odd), so 29 is not divisible by 2.

Step 2: Check divisibility by 3. Sum of digits = 2 + 9 = 11, which is not divisible by 3.

Step 3: Check divisibility by 5. Last digit is not 0 or 5.

Step 4: Check divisibility by 7. Double last digit: 9 x 2 = 18. Subtract 18 from remaining digit: 2 - 18 = -16, which is not divisible by 7.

Step 5: Since 29 is less than \(7^2 = 49\), no need to check higher primes.

Answer: 29 has no divisors other than 1 and itself, so it is a prime number.

Example 2: Prime Factorization of 84 Medium
Find the prime factors of 84 using a factor tree.

Step 1: Start by dividing 84 by the smallest prime number 2:

84 / 2 = 42

Step 2: Divide 42 by 2 again:

42 / 2 = 21

Step 3: 21 is not divisible by 2, try next prime 3:

21 / 3 = 7

Step 4: 7 is a prime number.

Answer: Prime factorization of 84 is \(2 \times 2 \times 3 \times 7\).

84 2 42 2 21 3 7 Factor Tree of 84 = 2 x 2 x 3 x 7
Example 3: Find All Prime Numbers Between 50 and 70 Medium
Identify all prime numbers between 50 and 70 using divisibility rules.

Check each number from 51 to 69:

  • 51: Sum digits 5+1=6 divisible by 3 -> composite
  • 52: Even -> composite
  • 53: Not divisible by 2, 3, 5, 7 -> prime
  • 54: Even -> composite
  • 55: Ends with 5 -> composite
  • 56: Even -> composite
  • 57: Sum digits 5+7=12 divisible by 3 -> composite
  • 58: Even -> composite
  • 59: Not divisible by 2, 3, 5, 7 -> prime
  • 60: Even -> composite
  • 61: Not divisible by 2, 3, 5, 7 -> prime
  • 62: Even -> composite
  • 63: Sum digits 6+3=9 divisible by 3 -> composite
  • 64: Even -> composite
  • 65: Ends with 5 -> composite
  • 66: Even -> composite
  • 67: Not divisible by 2, 3, 5, 7 -> prime
  • 68: Even -> composite
  • 69: Sum digits 6+9=15 divisible by 3 -> composite

Answer: Prime numbers between 50 and 70 are 53, 59, 61, and 67.

Example 4: Use Sieve of Eratosthenes to Find Primes up to 30 Medium
Apply the Sieve of Eratosthenes to list all prime numbers from 2 to 30.

Step 1: Write numbers 2 to 30.

Step 2: Start with 2, cross out multiples: 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30.

Step 3: Next uncrossed number is 3, cross out multiples: 6, 9, 12, 15, 18, 21, 24, 27, 30.

Step 4: Next uncrossed number is 5, cross out multiples: 10, 15, 20, 25, 30.

Step 5: Next uncrossed number is 7, cross out multiples: 14, 21, 28.

Step 6: Remaining numbers are primes: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29.

Answer: Primes up to 30 are 2, 3, 5, 7, 11, 13, 17, 19, 23, and 29.

graph TD    A[Start with numbers 2 to 30] --> B[Cross out multiples of 2]    B --> C[Cross out multiples of 3]    C --> D[Cross out multiples of 5]    D --> E[Cross out multiples of 7]    E --> F[List remaining numbers as primes]  
Example 5: Identify if 91 is Prime or Composite Easy
Determine whether 91 is a prime number.

Step 1: Check divisibility by 2: 91 is odd, so no.

Step 2: Check divisibility by 3: Sum digits 9+1=10, not divisible by 3.

Step 3: Check divisibility by 5: Last digit not 0 or 5.

Step 4: Check divisibility by 7: 91 / 7 = 13 (exact).

Answer: 91 is composite because it equals \(7 \times 13\).

Formula Bank

Prime Factorization
\[ n = p_1^{a_1} \times p_2^{a_2} \times \cdots \times p_k^{a_k} \]
where: \(n\) = composite number; \(p_i\) = prime factors; \(a_i\) = their respective exponents

Tips & Tricks

Tip: Check divisibility only up to the square root of the number.

When to use: When testing if a number is prime to save time.

Tip: Use the Sieve of Eratosthenes to find all primes up to a limit efficiently.

When to use: When needing to list multiple primes quickly.

Tip: Memorize prime numbers up to 50 for quick reference during exams.

When to use: To speed up problem-solving in competitive exams.

Tip: Remember that all primes except 2 are odd numbers.

When to use: To quickly eliminate even numbers greater than 2.

Tip: Always apply divisibility rules for small primes (2, 3, 5, 7, 11) before concluding primality.

When to use: When checking smaller numbers for prime status.

Common Mistakes to Avoid

❌ Assuming 1 is a prime number.
✓ Remember that prime numbers are greater than 1 and have exactly two divisors.
Why: Students confuse 1 as prime because it is a natural number.
❌ Testing divisibility beyond the square root of the number.
✓ Only test divisibility up to the square root to save time and avoid unnecessary calculations.
Why: Lack of understanding of prime testing efficiency.
❌ Confusing prime and composite numbers.
✓ Prime numbers have exactly two divisors; composite numbers have more than two.
Why: Insufficient practice distinguishing between the two.
❌ Forgetting to check divisibility by small primes like 2, 3, 5 before concluding primality.
✓ Always apply divisibility rules for small primes first.
Why: Students jump to conclusions without basic checks.
❌ Misapplying divisibility rules (e.g., sum of digits for 3 but using it for 9 incorrectly).
✓ Learn and apply each divisibility rule correctly and distinctly.
Why: Confusion due to similarity of rules.
Key Concept

Prime Numbers

Natural numbers greater than 1 with exactly two divisors: 1 and itself.

Key Concept

Prime Factorization

Every composite number can be uniquely expressed as a product of prime numbers.

Key Concept

Sieve of Eratosthenes

An efficient method to find all primes up to a given number by crossing out multiples.

✨ AI exam tools — try them free (included in every plan)
Tip: select any text above to Explain / Example / Simplify it.
Curated videos per subtopic
Top YouTube explainers, AI-ranked for your exam and language. Unlocks with subscription.
Unlock

Try Practice next.

Progress tracking is paywalled — subscribe to mark subtopics as understood and save your streak.

Go to practice →
Ask a doubt
Prime numbers · 10 free messages
Ask me anything about this subtopic. You have 10 free messages this session — chat history isn't saved in preview.