ScratchData LogoScratchData
Back to The_Scratch's profile

Lucas Pseudoprimes

THThe_Scratch•Created January 21, 2016
Lucas Pseudoprimes
1
0
24 views
View on Scratch

Description

i paused at 2:45 to make this. https://www.youtube.com/watch?v=lEvXcTYqtKU im not actually sure what the highest prime you can find with the 50K multiples is, before it doesn't list enough primes to find it. shruggerino. how it works: find lucas number n, where n is the # you want to check for prime-ness. Subtract lucas number by 1, and check if that is a multiple of n (it only searches 50K multiples). This isn't perfect which is why they're pseudo primes. they're 'probably' or 'probably not' primes. It probably works pretty well with smaller numbers, like 1-50, but it likely gets less accurate the larger the number gets. (See inside for instructions on how to update this to find larger numbers by listing more lucas' then searching 250K multiples instead of 50K.) i probably should've added a script to check EACH multiple one by one as it lists it instead of checking the entire list after they're done listing so you don't list 250K multiples if you only need, say, 10K. but i'm lazy and it would probably slow it down. example of what I mean: repeat 250000 { add ([lucas - 1] * j) to list if ([lucas - 1] * j) = n { stop this script } change j by 1 }

Project Details

Project ID94979755
CreatedJanuary 21, 2016
Last ModifiedJanuary 21, 2016
SharedJanuary 21, 2016
Visibilityvisible
CommentsAllowed