|
|||||||||||||||||
![]() |
![]() |
![]() |
|||||||||||||||
|
Sieve of Erastosthenes
To find out prime number manually the procedure of Sieve of Erastosthenes (275-194 BCE) is used. First, list all integers say 1 to M. Then we repeatedly delete all numbers that divisible by consecutive prime numbers except that prime number itself. We continue the deletion until there is no more composite integers within 1 to M. The remaining numbers are the prime numbers. For example, we set M = 100. Since composite integer is divisible by a prime not exceeding its square root, we only need to divide by prime number less than 10, which are 2, 3, 5 and 7. Notice that number 1 is still inside the sieve of Erastosthenes.
The following online program will let you play around while learning. This interactive Sieve of Erastosthenes program determines prime list between N1 and N2. With this handy tool, you can challenge yourself to answer these questions:
The interactive Sieve of Erastosthenes program below determines prime list between N1 and N2. If you like these tools recommend them to your friends and tell also to your teachers. In the next section, you will learn how to find prime number in a code. Preferable reference for this tutorial is Teknomo, Kardi (2010) Prime factor tutorial. http:\\people.revoledu.com\kardi\ tutorial\BasicMath\Prime\ |
|||||||||||||||||||
|
||||||||||||||||||||
|
||||||||||||||||||||