(04-20-2023, 02:02 PM)bplus Wrote: I've looked at this on You Tube, sieving is way way way faster!
Also requires a lot of memory. Although my program doesn't indicate it very well.
https://staging.qb64phoenix.com/showthread.php?tid=1536
To begin with I actually used one of Freebasic's example programs which was Eratosthenes' sieve.
It was a bit complicated, but my implementation was an array of bits, which was still quite large to get to a target of 100 billion. This was although all even numbers after 2 were excluded, and the first member of the bit array represented 3, the next 5, the one after 7 and so on.