Sieve of Eratosthenes - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

Home : Support : Online Help : Math Apps : Discrete Mathematics : Sieve of Eratosthenes

Sieve of Eratosthenes

Main Concept

• 

A prime number is a natural number greater than  that has no positive factor other than  and itself.

• 

A composite number is a natural number greater than  that has at least one factor other than 1 and itself, in other words, is not prime.

 

Eratosthenes' Method of Finding Prime Numbers:

1. 

Consider a grid of consecutive integers ranging from  to ; we exclude  from the grid because it is neither a prime nor composite number.

2. 

Let  be the first prime number, .

3. 

Mark off its multiples () ranging from  to  as composite numbers (mark  itself as prime).

4. 

Take  to be the next unmarked number on the grid, mark it as prime and mark all of its multiples ranging from  to  as composite numbers.**

5. 

Repeat step 4 until there are no more unmarked numbers in the grid less than or equal to .  For example, while  .

6. 

Mark the remaining unmarked numbers in the grid greater than  as prime numbers.

 

**Note : Multiples less than  can be disregarded because these numbers will have been marked off as multiples of lower primes. For example, when marking off the multiples of , the numbers  and  will already have been marked off as multiples of  and  respectively. We thus starting marking with .

Explore by changing the number of rows and columns. A grid of consecutive integers ranging from  to , where  equals the the number of rows multiplied by the number of columns, will be generated.

 

     

 

   Number of Rows          :               

   Number of Columns     :               

   Speed                          : 

More MathApps

Math/Apps/DiscreteMathematics


Download Help Document