Skip to content

Prime Sieve

You'll sieve out every prime up to 200 by hand, then test and factor some big numbers with nothing but patient division.

About

The sieve of Eratosthenes is 2,200 years old and still the fastest way to find small primes, and it's the first algorithm most people ever run by hand. It takes one evening on graph paper. After that, trial division teaches you why you only need to check up to the square root, which cuts out 99 percent of the work. The mistake everyone makes on the grid is crossing out the prime itself along with its multiples, so start each pass at the prime's square.

At a glance

Per requirement
15 XP
Completion bonus
75 XP
Requirements
5
Takes
One evening
Skill level
Beginner (done it a few times)
Cost
Free
Supplies
Nothing special
Where
At home
Other people
On your own

Requirements

  1. 1
    Write 2 to 200 on graph paper and cross out every multiple of 2, 3, 5, 7, 11 and 13. Lay it out in ten columns of twenty. Use a different color for each prime's multiples. You can stop at 13, because 17 squared is already past 200. Whatever is left is prime, and there should be 46 of them. Take a photo of the finished grid. Photo
  2. 2
    Circle every twin prime pair under 200. Twin primes are two apart, like 3 and 5, 5 and 7, and 11 and 13. There are 15 pairs under 200, so count yours and see if you agree. Take a photo of the grid with the pairs circled. Photo
  3. 3
    Explain in writing why you only have to check up to the square root. The idea is that if n has a factor bigger than its square root, it must also have one smaller. Say it in your own words with an example, like 91 being 7 x 13, and keep it under 100 words. Take a photo of the page. Photo
  4. 4
    Test three numbers between 1,000 and 10,000 for primality by hand. Pick them yourself, one odd number ending in 1, 3, 7 or 9 from each of three different thousand-ranges. Divide by every prime up to the square root. For 4,999 that means primes up to 70, which is 19 divisions. Show every one. Take a photo of the work with your verdict on each number. Photo
  5. 5
    Factor a six-digit number into primes and multiply it back together. Pick an even number or one ending in 5 so the first factors fall out fast. Keep dividing what's left by primes up to its square root. A remainder under 10,000 needs at most 25 divisions. If nothing divides a bigger remainder after 50 tries, it's probably prime, so say so, show the last division, and pick a second number. Check your answer by multiplying the factors back. Take a photo of the factor tree and the check. Photo