ScratchData LogoScratchData
Back to Slugger314's profile

List Of Primes- Revised Edition

SLSlugger314•Created January 8, 2019
List Of Primes- Revised Edition
0
0
1 views
View on Scratch

Instructions

All prime numbers (with the exception of 2 and 3) are multiples of 6, plus or minus 1. Given this, we only need to check these numbers for primality; no other numbers will be prime. In addition, instead of checking all prime numbers up to HALF of the number you are checking for primality, you only have to check until the SQUARE ROOT of the number. These facts, along with the optimizations made in Scratch 3.0 and the removal of the very long composites list, allow my prime checker to be significantly faster.

Description

Source: https://en.wikipedia.org/wiki/Primality_test

Project Details

Project ID277953530
CreatedJanuary 8, 2019
Last ModifiedJanuary 8, 2019
SharedJanuary 8, 2019
Visibilityvisible
CommentsAllowed