Sieve of Eratosthenes

The sieve of Eratosthenses is an ancient method of finding small prime numbers. It is based on the fact that all composite (non-prime) numbers are multiples of another number.

The steps for doing so is listed below.

  1. On the list of numbers on board, start by skipping 1 and marking the number 2 as prime (encircling).
  2. Skip count by 2 until all multiples of 2 are marked as composite (crossed-out).
  3. Since 1 is skipped, 2 is marked as a prime already, the smallest unmarked number is 3. Now, mark 3 as a prime number.
  4. As with step 2, skip count by 3 and mark the multiples of 3 that are unmarked as composite.
  5. The smallest unmarked number now is 5 as 4 is marked as composite from step 2. Mark 5 as prime and its multiples as composite.
  6. Repeat the process until all the numbers are marked as prime or composite.

See how to mark a number below.

  • In toggle marking mode, unmarked numbers gets marked as compoosite in one click, composites gets marked as primes, and primes gets unmarked.

    Hint: unmarked → composite → prime → unmarked

  • Click on the Mark As Composite button, and then click on numbers to mark them as composite.

  • Click on the Mark As Prime button, and then click on numbers to mark them as prime.

  • Click on the Unmark button and then click on numbers to erase the markings.

  • Click on the Undo button to undo the previous action.

  • Click on the Redo to redo the previously undone action.

  • Click on the Toggle Marking Mode button to toggle between Toggle mode and Fixed mode.

  • Click on the Toggle Lock Mode on Fixed Mode button to toggle between Unlocked mode and Locked mode. Whenever the mode is Locked while the Marking Mode is Fixed, only unmarked numbers gets to be marked as composite or prime avoiding accidentally change a previously marked number into another marking.

    Hint: Whenever a number is checked already be it prime or composite, its marking is unchangeable.

  • On the Checks pane, the Check All button checks all the numbers except for 1 if they are correctly marked as prime or composite. Green is for the correct ones, red is for the wrong ones, and yellow is for the ones that are skipped.

    Hint: The Tally pane account for all of marking and checking.

  • On the Guides pane, the Hint button puts a square outline on the number to signal that it is the next number to be marked as either prime or composite.

    Hint: This is based on the Steps explained above.

  • On the Guides pane, the Show Next Step button does the same as the Hint button with the addition of the help text on the Next Step seen on the Guides pane.

    Hint: Both buttons add hints that are counted on the Hints Tally statistics.

  • The Finish Step button will perform checks on the help text on the Next Step seen on the Guides pane. This button is enabled whenever Show Next Step button is activated, and it gets disabled whenever a number's marking is changed. So, to use it, activate Show Next Step, and then subsequently activate Finish Step.