Maths query side menu
As an Amazon Associate we earn from qualifying purchases.

Prime Numbers with Sieve of Eratosthenes Test

Found in topics: Numbers
Maths Query > Unit > Arithmetic > Number System

What is Prime Number?

Any Natural number greater than 1, which is divisible by 1 and only by itself is called Prime Number.

Example

2, 3, 5, 7, 11 etc.

Arrangement of prime numbers

Prime numbers can be arranged in a line form like shown as below in the diagram.

Arrangement of prime numbers
Arrangement of prime numbers

What is composite number?

Any Natural number, which is greater than 1 and is not a Prime Number is called a Composite Number.

Example

4, 6, 8, 9, 10 etc.

Note

1 is neither a Prime Number nor Composite Number.

Note

Every number in maths can either be a prime or a composite number except 0 and 1 because 0 and 1 are neither a prime number nor a composite number.

Arrangement of composite numbers

Composite numbers can be arranged in a rectangular or square form like shown as below in the diagram.

Arrangement of composite numbers
Arrangement of composite numbers

How to find prime numbers?

Many mathematicians have worked on primality tests to test whether a number is prime. However, the oldest study of prime numbers was conducted by ancient Greek mathematicians. One of such famous demonstrations were given by Euclid in his book Euclid’s Elements, which discusses about the infinite many primes.

Fibonacci, who was an italian mathematician was the first to describe trial division for primarily test. But the greek mathematician Eratosthenes found a simple method to find prime numbers. This algorithm is known as sieve of Eratosthenes to find prime numbers upto a given limit.

Sieve of Eratosthenes

In Sieve of Eratosthenes method, each number is tested for its primality, by processing each number one by one.
Let’s understand how this algorithm works by finding the prime numbers between 1 and 100.
Step 1: Cross out 1 as it is neither a prime not a composite.

Step 1
Find prime numbers between 1 and 100 using Sieve of Eratosthenes step 1

Step 2: Encircle 2 and cross out all multiples of 2.

Step 2
Find prime numbers between 1 and 100 using Sieve of Eratosthenes step 2

Step 3: Encircle 3 and cross out all multiples of 3, leaving out the one which have been already crossed out.

Step 3
Find prime numbers between 1 and 100 using Sieve of Eratosthenes step 3

Step 4: Encircle 5 and cross out all multiples of 5, again do not cross out which have already been crossed.

Step 4
Find prime numbers between 1 and 100 using Sieve of Eratosthenes step 4

Step 5: Encircle 7 and cross out all multiples of 7 and do not cross out again, which are already crossed.

Step 5
Find prime numbers between 1 and 100 using Sieve of Eratosthenes step 5

So, there are 25 prime numbers between1 and 100.

Prime numbers between 1 and 100
Prime numbers between 1 and 100
Note
  1. A prime number has exactly two divisors.
  2. 2 is the smallest prime number.
  3. 2 is also the smallest even prime number.
  4. All prime numbers except 2 are odd.
  5. 3 is the smallest odd prime number.
  6. 4 is the smallest composite prime number.
  7. 2 and 3 are the only consecutive prime numbers.
  8. The set of prime numbers is denoted by P.

What are coprimes?

Two numbers are called to be coprime or co-prime if they have only 1 as a common factor.

In other way, we can say if greatest common divisor of two numbers is 1, then the two numbers are coprimes.

Example

(2,3), (14,15), (8,13) etc.

What is twin prime?

Two numbers are called Twin Prime if they differ by 2 only or we can say that there is only one composite number between them. One prime number can be 2 more or 2 less than another prime number.

Example

(3, 5), (29, 31), (71, 73) etc.

List of twin prime numbers between 1 and 100 are:

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

5 is the only prime number that belongs to two pairs (3, 5) and (5, 3).

What are prime triplets?

A set of three consecutive Prime Numbers if the smallest and the largest differ by 6 and must be in the form of (p, p + 2, p + 6) is called a Prime Triplet.

Example

(5,7,11)
Why?
Because, 5, 7 and 11 is in the form of p, p + 2, p + 6
where p = 5
p + 2 = 5 + 2 = 7
and p + 6 = 5 + 6 = 11

Solved Examples

1) Check whether the following numbers are prime numbers or composite numbers.
142, 211, 291, 323, 247

a) 142 is a composite number because it is divisible by 2.
b) 211 is a prime number.
b) 291 is a composite number because it is divisible by 3.
d) 323 is a composite number because it is divisible by 17.
e) 427 is a composite number because it is divisible by 7.

2) List all pair of twin primes between 50 and 100.

(59, 61) and (71, 73) are thw twin primes between 50 and 100.

3) Find the seven consecutive composite numbers less than 100 and there should be no prime numbers between them.

90, 91, 92, 93, 94, 95, 96

4) Write the only prime number between 90 and 100.

97 is the only prime number between 90 and 100.

5) Write all even prime numbers between 1 and 100.

2 is the only prime numbers between 1 and 100.

6) Write all prime numbers less than 50.

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43 and 47 are the prime numbers which are less than 50.

7) Write all pair of twin primes between 1 and 100.

The following pairs are the twin primes between 1 and 100.
(3, 5)
(5, 7)
(11, 13)
(17, 19)
(29, 31)
(41, 43)
(59, 61)
(71, 73)

8) Write the total number of prime numbers between 1 and 100.

The total number of prime numbers between 1 and 100 are 25.

Worksheet 1

Download PDF 1

Fill in the blanks

  1. Total number of even prime numbers is ___________.
  2. The smallest prime number is ___________.
  3. The number of primes between 0 and 100 is ___________.
  4. The least odd prime number is ___________.
  5. The pair of (71, 73) is called ___________ primes.
  6. 138 is a ___________ number.
  7. Every prime number except 2 is an ___________ number.
  8. The pair of (14, 15) is called ___________.
  9. Any two ___________ numbers are always coprime.
  10. ___________ is neither prime nor composite number.
Help iconHelp box
twin
coprime
3
1
2
odd
composite
25
1
prime

Worksheet 2

Download PDF 2

Solve the questions

  1. Write prime numbers between 90 and 100.
  2. Write all pairs of twin primes between 1 and 50.
  3. Write all prime numbers between 10 and 40.
  4. Find all prime numbers between 70 and 80.
  5. Find factors of the following numbers and check whether each number is a prime number.
    1. 45
    2. 31
    3. 99
    4. 58
    5. 71

Worksheet 3

Download PDF 3

Multiple choice questions

1) The greatest two digit prime number is.
  1. 91
  2. 97
  3. 99
  4. 93
2) The only prime number between 90 and 100 is
  1. 97
  2. 99
  3. 93
  4. 98
3) 79 and 89 both are ___________ numbers.
  1. prime
  2. composite
  3. twin
  4. unique
4) 2 and 3 are only ___________ prime numbers.
  1. consecutive
  2. twin
  3. unique
  4. odd
5) The smallest odd prime number is
  1. 2
  2. 3
  3. 1
  4. 4
6) The greatest one digit prime number is
  1. 1
  2. 2
  3. 5
  4. 7
7) Which of the following pairs of numbers are not twin prime?
  1. 41 and 43
  2. 71 and 73
  3. 53 and 59
  4. 11 and 13
8) Which of the following pairs of numbers are coprime?
  1. 3 and 17
  2. 17 and 68
  3. 14 and 16
  4. 13 and 91
9) The number of prime numbers between 50 and 100 are
  1. 8
  2. 10
  3. 12
  4. 6
10) The prime numbers between 70 and 80 are
  1. 72, 73, 74
  2. 71, 72, 73
  3. 71, 74, 79
  4. 71, 73, 79
MCQs Answer Key chevron-right icon
Last updated on: 05-02-2025

Search Maths books by grade

Maths units list

Search Maths chapters by topic