**>>> Testing new web page format**problems? suggestions?

# Paul Jobling's NewPGen

(This page and the program **NewPGen** are both written
by Paul Jobling).

### Introduction

If you want to quickly find a large prime of the form *k*^{.}*b*^{n}+1
or *k*^{.}*b*^{n}-1; a large pair of
twin primes,
Sophie
Germain primes, or a Cunningham
Chain of length two; a large BiTwin chain; or a large and long Cunningham
Chain, then the last thing that you should use is Yves Gallot's Proth.exe!
I say the last thing because before that you ought to quickly sieve out
any *k, n* values that are divisible by small primes. If *n*
is fixed then this can be done very efficiently, reducing the overall
search time. Another advantage of fixing *n* is that you can
have a good idea of the overall probability of a successful search.

This program, **NewPGen**, performs this type of sieving. **NewPGen**
should be used to throw out candidate *k*'s until the rate at which
it is removing them exceeds the rate at which Proth.exe can perform a
power test. At that point Proth.exe should be used to complete the search, with `PMax=0`

(as trial factoring has already been performed by ** NewPGen**).

### Usage

To use **NewPGen**, simply start it up. You can obtain help
from the *Help* menu item, though it ought to be fairly self-explanatory.
Simple enter the name of the file to generate, the values of the base
and *n* to use, the range of *k* to use, the type of sieve to
perform, and press the *Start *button.

The number of *k*'s that can be sieved is dependent upon available
memory. The more *k*'s that you sieve, the greater the overall
time saved, as more *k*'s are available to be thrown out.

### Technical Specifications

**NewPGen** can currently sieve for the following types of search:

*k*^{.}*b*^{n}+1*k*^{.}*b*^{n}-1*k*^{.}*b*±1 (twin primes)^{n}*k*^{.}*b*-1, 2^{n}*k*^{.}*b*-1 (Sophie Germain)^{n}*k*^{.}2^{n}+1,*k*^{.}2^{n+1}+3 (Sophie Germain)*k*^{.}*b*+1, 2^{n}*k*^{.}*b*+1 (Cunningham Chain 2nd kind, length 2)^{n}*k*^{.}*b*±1, 2^{n}*k*^{.}*b*±1 (BiTwin chain length 1)^{n}*k*^{.}*b*±1, 2^{n}*k*^{.}*b*+1 (mixed twin and Cunningham chain)^{n}*k*^{.}*b*±1, 2^{n}*k*^{.}*b*-1 (mixed twin and Sophie Germain)^{n}*k*^{.}*b*±1,^{n}*k*^{.}*b*+1, ½^{n}^{.}*k*^{.}*b*+1 (to test^{n}*k*^{.}*b*+1, and if that is prime check the other 3 for the chance of a twin prime or CC 2nd kind)^{n}*k*^{.}*b*±1, 2^{n}*k*^{.}*b*-1, ½^{n}^{.}*k*^{.}*b*-1(to test^{n}*k*^{.}*b*-1, and if that is prime check the other 3 for the chance of a twin prime or Sophie Germain)^{n}- Cunningham chains of the first or second kinds of arbitrary length
- BiTwin chains of arbitrary length

**NewPGen **can also be used to generate an output file
to use with some Primeform searches. These are basically the same as the
above, save that a primorial is used:

*k*^{.}*n*#+1*k*-1^{.}*n*#*k*±1 (twin primes)^{.}*n*#*k*-1, 2^{.}*n*#^{.}*k*^{.}*n*#-1 (Sophie Germain)*k*+1, 2^{.}*n*#^{.}*k*+1 (Cunningham Chain 2nd kind, length 2)^{.}*n*#*k*±1, 2^{.}*n*#±1 (BiTwin chain length 1)^{.}k^{.}*n*#*k*±1, 2^{.}*n*#+1 (mixed twin and Cunningham chain)^{.}k^{.}*n*#*k*±1, 2^{.}*n*#-1 (mixed twin and Sophie Germain)^{.}k^{.}*n*#*k*±1, ½^{.}*n*#^{.}*k*^{.}*n*#+1,2+1 (to test^{.}k^{.}*n*#*k*+1, and if that is prime check the other 3 for the chance of a twin prime or CC 2nd kind)^{.}*n*#*k*#±1, ½^{.}n^{.}*k*#-1,2^{.}n^{.}*k*#-1 (to test^{.}n*k*#+1, and if that is prime check the other 3 for the chance of a twin prime or Sophie Germain)^{.}n- Cunningham chains of the first or second kinds of arbitrary length
- BiTwin chains of arbitrary length

*k*

^{.}2

^{n}sieves is:

`1,152,921,504,606,846,976`

. The maximum candidate divisor for the other sieves is:

`140,737,488,355,327`

.
The maximum value of

*n*that can be used in a primorial sieve is:

`274,579.`