Sieve of Eratosthenes
This recipe is all about generating prime numbers. It is a known algorithm that can generate these numbers for us. An algorithm is a specific procedure (or set of instructions) that leads us to a result. If you'd like detailed information about how the algorithm works, you should take a moment to visit http://mathworld.wolfram.com/SieveofEratosthenes.html.
In a nutshell, the sieve works by determining if a number is prime by doing the following. You write down all of the numbers from 2 until your end point (let's say that we want to find all of the primes until the number 100 ; you'd write every number from 2 to 100). Next, go through each number from smallest to greatest and cross it out if it is divisible by 2. Then look at the smallest number in the list (in our case, 3). Beginning with the next number higher than 3, cross out each number divisible by 3. Continue this process until you've gotten to , where n is the number you were going up to. All of the numbers that...