When should I stop using NewPGen and start primality testing?
I'm using NewPGen.
The n value is 4,001,337 and the range of k I'm using is 1,000,000 to 21,000,000. When should I stop sieving? 
[QUOTE=YaoPlaysMC;563412]I'm using NewPGen.
The n value is 4,001,337 and the range of k I'm using is 1,000,000 to 21,000,000. When should I stop sieving?[/QUOTE] What form are you sieving? newpgen is old and slow compared to newer sieving software for some forms. 
I'm using k*2^n1

If you are sieving k*2^n1 you should consider using mtsieve, which has a sieve called fbncsieve which can sieve this form faster than newpgen (and it's multithreaded too).
Anyway, to answer your question, you'll want to stop sieving when the time it takes to test a candidate with pfgw or LLR is equal to the time it takes to remove a term from the sieve file. 
[QUOTE=YaoPlaysMC;563423]I'm using k*2^n1[/QUOTE]
That's the Riesel prime form, and you should use srsieve2 (from the mtsieve package) to start the sieve, and then either sr1sieve (if you're working with one or two [I]k[/I]'s) or sr2sieve (if you're sieving more than two [I]k[/I]'s) to finish it. The advice Dylan gave on when to stop is correct, and I'll add that you should be using LLR for numbers of this form. Edit: I read the replies first and then the OP. :davieddy: Disregard what I said except that you should use LLR instead of PFGW. 
[QUOTE=YaoPlaysMC;563412]I'm using NewPGen.
The n value is 4,001,337 and the range of k I'm using is 1,000,000 to 21,000,000. When should I stop sieving?[/QUOTE] It depends on what you are planning to find. ▪ Plan A. You want to sieve and then you want to test all of them and find all primes (~4 or even 78 if you keep even k values in the sieve), then see answer above. ▪ Plan B. You want to find one prime and then stop. Then you should stop earlier (~48 times earlier); you should have sieved in a range which is 234 times smaller, too. Use well known estimates for density of primes and a couple pencil lines on a napkin. ▪ Plan C. Take previously sieved RPS files (they are deeper than you can ever dream to sieve), and take n>=4,001,337. Then when you do find a prime, you can always reformat it in a way that n is exactly 4,001,337 and k will be even, but so what. Your n is arbitrary anyway. In either case, the earlier you run pencil estimates of how many core years you will need to spend , the better, maybe even before starting sieving. Do you have access to the required number of coreyears? 
All times are UTC. The time now is 23:01. 
Powered by vBulletin® Version 3.8.11
Copyright ©2000  2021, Jelsoft Enterprises Ltd.