Prime numbers

En Fr


Tests of primes by Bernard


The program tests a variety of prime numbers developed by Bernard (-h for options). Each option uses a different algorithm.

Program download: version 1.1a Windows (cmd line)
Program download: version 1.0b PC Linux

usage: liste_premier -[option][param] [file]
-v : display program version
-p1 n1 n2 [filer]: prime numbers list after n1 up to the first after n2
-p2 n1 n2 [fiile]: prime number liis from n1 to n2
-p3 n1 n2 max_exponent [file]: Mersenne prime number list (small exponent)
-p4 n1 n2 max_exponent [file]: Mersenne prime number list (bigger exponent)
-p5 n1 [file]: Mersenne prime test (small)
-p6 n1 max_exponent [file]: Mersenne prime test to max_exponent (with undefined)
-p7 n1 [file]: Lucas-Lehmer test for Mersenne primes (if compiled with GNU MP)
-p8 n1 [file]: display M(p) in base 10 (if compiled with GNU MP)

with -p7 option you can really try your luck for the world record!


Testing program Mersenne primes developed by Bernard (-h for options). This program uses the Lucas-Lehmer test.

To test whether 2 ** 86243-1 is a Mersenne prime, use the command: test_lm_bs -p 86243.
The exponent must be a prime number to test a number Mersenne prime.
The answer is of the form: MM / DD / YYYY HH: MM: SS version exponent_tested test_delay result.
If result equals P then 2 ** exponent-1 is a Mersenne prime, if not result equal N.
The results are logged in the file lm_bs_historique.txt.

Program download: version 1.4l PC Windows (cmd line)
Program download: version 1.4j PC Linux

usage: test_lm_bs -[v|p|r|t|t1|t2] [p] [file]
-v : display program version
-p p [file] : L.M. test for p (p = prime)
-r p [file] : continue the L.M. test (if stopped) for p
-t p : display the memory allocate for -p p
-t1 p : list of tests M(p) with L.M. test up to p
-t2 p : L.M test up to p (for the first numbers compare with a knows list of M(p))


Program to display numbers into base 10 for a Mersenne prime number. The algorithm is from Slowinski, CRI.

This program upload from Internet was adapted to work on Windows by Bernard.
To display numbers from 2**86243-1, use the command: bs_prime 86243.

Download program: PC Windows version (cmd line)


For more details about the programs, algorithms used and meanings, do not hesitate to read documentation pdf(French).



Others versions (and OS) on demand.

Contact Bernard or use the forum.