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:
Consider a grid of consecutive integers ranging from to ; we exclude from the grid because it is neither a prime nor composite number.
Let be the first prime number, .
Mark off its multiples () ranging from to as composite numbers (mark itself as prime).
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.**
Repeat step 4 until there are no more unmarked numbers in the grid less than or equal to . For example, while .
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 : 5678910111213141516171819202122232425
Number of Columns : 5678910111213141516171819202122232425
Speed : SlowestSlowMediumFastFastest
More MathApps
Math/Apps/DiscreteMathematics
Download Help Document