Thread: A113767
View Single Post
Old 2018-04-15, 00:03   #10
Citrix
 
Citrix's Avatar
 
Jun 2003

110000111102 Posts
Default

Quote:
Originally Posted by henryzz View Post
I think your best bet might be to modify mtsieve adding a fixed k sieve with k being a gmp number.
Your runtime might be dominated though by calculating k % p as that is a very large k. Whatever you do I don't think it is going to be overly fast.
http://www.mersenneforum.org/rogue/mtsieve.html
Thank you for pointing out mtsieve. (I did not know about this before :( )
There is something called modular exponentiation which will calculate k%p very fast.
Calculating k%p will take very little time per prime.

Addendum: Looks like srsieve is not implemented yet. So this will not help.

Last fiddled with by Citrix on 2018-04-15 at 00:13
Citrix is offline   Reply With Quote