This is Eratosthene's Sieve which gives a method for computing in a relatively fast manner, what all the prime numbers are, up to a certain number. For example, to see which of the first 100 numbers are prime, start by listing all the numbers using a black font. At the end, those numbers remaining black are prime. 1 is greyed out as it isn't prime. Now we color all factorizable numbers in the following order: 1. color all the even numbers greater than 2 pale green. 2. color all the black multiples of 3 pale blue --except 3. [4 has already been colored so go on to 5] 3. color all the black multiples of 5 pale red --except 5. [6 has already been colored so go on to 7] 4. color all the black multiples of 7 orange --except 7. [8, 9 and 10 already colored] 5. STOP because this only needs to be done up to the square root of 100.