Sieve of Eratosthenes

This is an implementation of the Sieve of Eratosthenes (try pronouncing that one) in JavaScript using the canvas display buffer for storage in order to avoid creating a huge buffer. The result is a picture showing all the prime numbers up to the page's width*height, which in your case will be freaking unknown. Once the picture is generated, you can click to query it to find out if a number is prime.

©2022 Alan-Turing.org