ScratchData LogoScratchData
Back to SavetheAtlantic's profile

Sieve of Eratosthenes

SASavetheAtlantic•Created June 3, 2022
Sieve of Eratosthenes
2
2
23 views
View on Scratch

Description

This project is an implementation of the Sieve of Eratosthenes. It is an ancient method of calculating prime numbers dating back to the 3rd century BCE. For such an old algorithm, it is highly efficient for smaller primes (i.e. less than a million). Here, the function "sieve" outputs all primes from 2 to n^2. Due to Scratch limitations n^2 can only be 200,000. This is still plenty for nearly 18,000 prime numbers.

Project Details

Project ID700655654
CreatedJune 3, 2022
Last ModifiedAugust 3, 2022
SharedJune 6, 2022
Visibilityvisible
CommentsAllowed