Using NewPGen


The following options need to be set once and then will be remembered:

  1. Set Priority Idle radio button (optional but a good idea).
  2. Set menu Options / Use two save files (also a good idea).
  3. Set menu Options / Minutes between automatic saves to 120 (the sieve file is large and takes a while to save so reduces the overhead).

The following options need to be set each time the program is started:

  1. Set Verify results checkbox.
  2. Set menu Options / Log the numbers removed (this is vital as we need the factors).
  3. Set menu Options / Sieve until / Sieve up to p= to the end of your reserved range.
  4. Set Continuing sieving an old file radio button.

Then specify the Input file as the sieve file  and the Output file as the sieve file.  Then click the Start button.


The flag to create two save files must be set once in NewPGen.ini as it cannot be set from the command line. Run ./snewpgen and then choose option 5 to immediately exit.  Edit NewPGen.ini and change DSM_TwoSaveFiles = 0 to DSM_TwoSaveFiles = 1 and TwoSaveFile = 0 to TwoSaveFiles = 1.

I have created a shell script to run NewPGen from the command line.  It is called with

./ <<sieve_file>> <<stop_p>>

where <<sieve_file> is the name of the sieve file and <<stop_p>> is the value of p to stop at in T.   For example

./ 0.1-120T_20000.txt 21000

to sieve from 20000T to 21000T.

Range Complete

When your reserved range is complete, upload the saved factors file to sendspace and post the link in the forum.