Paul Jobling's NewPGen 
(Another of the Prime Pages' resources)
 Our book "Prime Curios! The Dictionary of Prime Number Trivia" is now available on CreateSpace, Amazon, ....


Home
Search Site

Largest
The 5000
Top 20
Finding
How Many?
Mersenne

Glossary
Prime Curios!
Prime Lists

FAQ
e-mail list
Titans

Submit primes

[ Introduction | Usage | Technical SpecificationsDownload ]
(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.bn+1 or k.bn-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.bn+1
  • k.bn-1
  • k.bn±1 (twin primes)
  • k.bn-1, 2k.bn-1 (Sophie Germain)
  • k.2n+1, k.2n+1+3 (Sophie Germain)
  • k.bn+1, 2k.bn+1 (Cunningham Chain 2nd kind, length 2)
  • k.bn±1, 2k.bn±1 (BiTwin chain length 1)
  • k.bn±1, 2k.bn+1 (mixed twin and Cunningham chain)
  • k.bn±1, 2k.bn-1 (mixed twin and Sophie Germain)
  • k.bn±1, k.bn+1, ½.k.bn+1 (to test k.bn+1, and if that is prime check the other 3 for the chance of a twin prime or CC 2nd kind)
  • k.bn±1, 2k.bn-1, ½.k.bn-1(to test k.bn-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
The maximum candidate divisor for the k.2n 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.

To download, choose one of the following:

The Prime Pages
Another prime page by Chris K. Caldwell <caldwell@utm.edu>