anaphor
Joined 13 years ago
Joined 13 years ago
It basically uses the priority queue to store all the composites up to a certain point and then you can assume the next one is prime.
I had some (admittedly not well written) code for it too https://gist.github.com/weskerfoot/4699275
It can also incorporates the wheel factorization optimization mentioned in this article.
Lots of people get started with things like using a microcontroller to light up some LEDs and so on. That will introduce you to basic concepts like how transistors work as well if you dig into it.
https://www.youtube.com/watch?v=xSRe_4TQbuo&list=PLvOlSehNtu...
I also found this https://disconnected.systems/blog/nim-on-adruino