##Visualized Sieve of Erathosthenes## After starting to refresh myself up on algorithms, I rediscovered this old favorite. It is an old, old algorithm to find prime numbers. Alas - I struggled for a bit on the assumptions (such as starting on n^2 for each sequential sieve iteration). Once I fully understood it, I was left with a want to visualize the iterations. As such, I've made this visualization to hopefully help anyone just first encountering the algorithm.
- The current number used for sieving is indicated with a pipeline
- Numbers which are sieved are highlighted in the color of their factor
- Numbers which have been used to sieve are underlined, and
- A circle jumps around to indicate the square of the current sieving number.
It is not optimized, so as to demonstrate the need to jump over previously-sieved numbers, as well as to show the effects of starting at n^2 with a highlighted circle.
An interesting and didactic effect of seeing a long list of numbers (160 in this case) is that one can see how only the primary numbers sieve any numbers down the list; the composite numbers will leave the list unaffected.