# NewPGen

**NewPGen** is a program written by Paul Jobling that is used to sieve a set of many candidate numbers, of the following forms:

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

When searching for these kinds of primes you ought to rapidly sieve out any k or n divisible by small primes. Since it works with a large set of numbers and uses fast implementations, it is a lot better than performing trial factoring on each number in the set.

Its output can be used with any other program for primality testing the numbers. Some examples are PRP, LLR and PFGW.

## External links

**Sieving program**

Program |

Tools |

Links |