Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

In otherwise great paper on prime numbers, I found following visualization of Eratosthenes’ sieve:

enter image description here

I found it somewhat scary and confusing.

Is there any better visualization of Eratosthenes’ sieve out there?

share|improve this question
2  
Try to find an animation. A fixed image is terrible for representing an algorithm. –  Thomas Andrews Jul 20 at 21:22
1  
A nice feature of this visualization is that it shows the pattern of multiples of each prime--including numbers that are multiples of more than one prime. You don't get the full effect of this when each number has to be marked in just one way, even if you use a different color for each prime. But it does result in a very cluttered diagram. –  David K Jul 20 at 21:33
1  
All primes except for $2$ and $3$ are of the form $6n\pm1$. Hence the $2\times2=4$ columns in the table of width $12$. –  Lucian Jul 20 at 23:02

2 Answers 2

up vote 5 down vote accepted

From Wikipedia. Sieve of Eratosthenes:

enter image description here

share|improve this answer
1  
This animation also nicely illustrates the fact that, to find all the primes up to some maximum $n$, you only need to sieve out multiples of primes less than $\sqrt n$. (Here, $n = 120 < 11^2 = 121$, so the only primes whose multiples need to be sieved out are 2, 3, 5 and 7.) After that, all the remaining unsieved numbers will be primes. –  Ilmari Karonen Jul 20 at 22:45

I definitely agree that animation and interactivity would be helpful in this case.

However, I just found three static visualizations similar to the one from the question, but in my opinion significantly better:

enter image description here

enter image description here

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.