Mersenne Prime Freeware
"Share and Enjoy"
The Amdahl 6's motto
Mirror sites
For increased performance, this page has been mirrored. Please choose
the site closest to you for the best performance.
Software
Software for Pentium & 486 processors
Go to the GIMPS
homepage. George Woltman's programs are the fastest on Intel
chips running Windows 3.x, Win95, WinNT, OS/2, Linux and UNIXWARE.
lucas.c on users.delta.com
This is Dr. Richard Crandall's original Mersenne number
testing program. Written in generic 'C'. George Woltman's lightening fast
Pentium program has its roots in this code.
Reported to be OK
- Sun Ultra Enterprise 3000 with Solaris 2.5.1
- Linux (i386)
- other UNIX flavors
mers on ftp.delta.com
mers 4.1 is a collection of programs guarded by Will
Edgington, the Abbé of Revision Control. This is most useful for
machines not running MS-Windows (NT (intel), 95, or 3.1), OS/2, i386
Linux, or PowerPC-based MacOS.
Because some WWW browsers insist
on using binary mode when ftp'ing files, Will has packaged mers
four different ways:
| README |
HTML |
file about mers package |
| mers.shar.gz |
binary |
'gunzip mers.shar; unshar mers.shar' |
| mers.shar |
ascii |
'unshar mers.shar' or 'sh mers.shar' |
|
mers.tar.gz
|
binary |
'tar xzf mers.tar' (FSF/GNU tar) or 'gunzip mers.tar; tar xf mers.tar'
Windows users: WinZIP can read
this file. Rename it to 'mers.tgz'. |
| mers.tar |
binary |
'tar xf mers.tar'
Windows users: WinZIP can read
this file. |
- fftlucas.c, Dr. Crandall's Mersenne primality
test program in generic 'C'. Program mersenne1.c (below) is
faster. Ported to (at least) these platforms:
- Known to be OK
- SunOS 4.x (Solaris 1.x)
- Intel Linux using gcc v2.6.2 and up
- Reported to be OK
- SunOS 5.x (Solaris 2.x) (need to edit Makefile)
- HPUX (version ?)
- CSet++ V3 under IBM's AIX 4
- fftll - script that runs fftlucas
- mersenne1.c, Lucas-Lehmer Mersenne number primality tests.
Jason Kline modified/tuned Dr. Crandall's code. This
program is faster than fftlucas.c. The programs
are well-documented. See the source for details. There are two
versions. Should compile and run on UNIX systems, e.g. Sun SPARCs, SGIs,
and HPs.
- Faster Version (breaks up the FFT) (actually a Hartley Transform)
- mersenne1.c does the LL test
- Slower Version (FFT can be replaced)
Known to run under
Reported to run under
- CSet++ V3 under IBM's AIX 4
- SGI IRIX 5.x
- This list needs to be updated.
- extract.c - Translates the GIMPS master file database
to HRF (Human Readable Format). This program is portable and reads
George's database, mers package checkpoints including with the factorers
for inputting the power of 2 format. If you want HR data, see The
Mersenne Database section on George Woltman's status page.
- mersfacgmp -
A trial factorer, original author anonymous, with Free Software
Foundation (FSF) libgmp.a arbitrary precision library support
libgmp.a
source code, also available from numerous FSF/GNU mirror
sites.
- mersfacint -
A trial factorer based on mersfacgmp and the
original program but using 64 bit integer changes by Rob Hooft.
- mersfaclip -
A trial factorer based on mersfacgmp that uses the freeLIP package
(written by Ajren Lenstra and presently maintained by Paul Leyland)
rather than libgmp.a. FreeLIP is available here. As with the mers
package itself, you probably want the newest version available.
- ecm3 -
An ECM (elliptic curve method) factorer that uses freeLIP's ECM
functions to attempt to find factors of small Mersenne numbers, which
works for composite as well as prime exponents, though it does not
always completely factor composite exponent Mersennes. Based on code
by Eric Prestemon.
- contract -
New with the 3.0 release of the package, this program is based on
code from Jean-Charles Meyrignac and reads the file lowM.txt and
produces a DATABASE file in the form expected by George Woltman's
prime95 and other programs.
- Makefile - makefile for the above programs
M3 on nigel.mae.cwru.edu
M3 stands for Mayer, Montgomery and
Mersenne
This Mersenne-related software package maintained by Ernst W. Mayer.
As implied by the server name, this is the Mersenne-testing package
that "goes to eleven." Contains a complete set of programs for
Mersenne number primality testing and factoring:
A backup site is located on www.scruznet.com, and ftp.scruznet.com, space curtesy of Luke Welsh.
- README
instructions for using the M3 package for Mersenne
testing.
- lucas_mayer_V2.4.f90.gz
V2.4 of EWM's Lucas-Lehmer program (16 KB). Uses a radix-8 FFT
implementation. Very fast.
Writes savefiles, making for easy restarts in case of interrupts.
Can prove M(1257787) prime in less than 24 hours on a 500MHz Alpha 21164.
Known to be okay on: DEC Alpha, SGI (i.e. MIPS), SPARC.
- Mfactor.c.gz, ALPHAtryq.s.gz
Peter Montgomery's sieve-based factoring code for
RISC architectures such as Alpha/MIPS/SPARC (38 KB). ALPHAtryq.s.gz
(5KB) is an Alpha-optimized supplemental assembly code. Extremely fast.
Can sieve up to 2^62. Should be used in conjunction
with lucas_mayer for serious primality testing of M(p).
- primes.db.gz
a file containing all primes < 5.3 million, gzipped (0.9 MB).
Needed for large-scale factoring prior to primality testing a range.
- factors.db.gz
a recent copy of the GIMPS factor database, gzipped (2.1 MB). Used to
restrict the factoring prior to primality testing a range.
- mersenne_pm1.f90.gz
DWT-based P-1 factoring code for prime-exponent Mersenne numbers (26 KB).
Can test exponents up to 5.25 million. Includes a fast stage 2 algorithm;
can test both numbers for which no factor is known and search for additional
factors of M(p) with known factors. Writes savefiles for restart in
case of an interrupt or for running deeper stages 1 and 2 upon demand.
Known to be okay on: DEC Alpha, SGI.
- binaries
Executable binary for DEC Alpha based OpenVMS and Digital UNIX (aka
OSF1). See the README for details.
Note: If you plan on searching for new factors of M(p) with p <
50000, please contact Will Edgington to reserve a
range of exponents.
- mersenne_cofactor.f90.gz
Mersenne cofactor primality testing code (14 KB). Can be used to
perform a fast probable-primality test on cofactors associated with new
factors of M(p). Uses a DWT-based Euler-base-3 probable-primality test
(of M(p)) and a Suyama-like post-test (of the cofactor); Much faster
than generic Miller-Rabin. Known to be okay on: DEC Alpha.
John Sweeney has
written MacLucas V1.4 available in StuffIt! format from the GIMPS
free software page. Source code for v1.4 and "Wisdom" for
MacLucas is available from Will Edgington's
Mersenne page.
by Marcel van de Vusse (mvusse@bright.net)
This is an OS/2 port of George Woltman's Linux prime v1.1.
Second preliminary release for OS/2. It allows you to change the priority
at which the program is running.
From Legacy Software on bright.net.
ecm3
on ftp.netdoor.com
Compiled for DOS by Conrad Curry <cwcurry@whale.st.usm.edu>
Based on ecm3 version 4.1 from the mers package,
compiled with DJGPP.
An ECM (elliptic curve method) factorer that uses freeLIP's ECM
functions to attempt to find factors of small Mersenne numbers, which
works for composite as well as prime exponents, though it does not
always completely factor composite exponent Mersennes. Based on code
by Eric Prestemon.
mmfac
on ftp.netdoor.com
Compiled for DOS by Conrad Curry a DOS program (with source) for
factoring M( M(p) ) numbers based on mmtrial in the
mers package.
Landon Noll's implementation of The Amdahl 6
method to find humongous Mersenne-like primes. Read
Landon's
Notes on his homepage. Needs the calc package
(below) on this page.
Yuri Sorkin's program that generates all primes < 2^31.
Very fast. Written in C. Takes only 3 minutes on a 486 DX2/80 to generate
all 7,603,553 primes less than 2^27. ~35 minutes for all p < 2^31.
Yuri is working on a faster and more versatile version of genprost.
prime on ftp.cray.com
FORTRAN and C versions of a program to compute Mersenne numbers
in decimal so that they may be printed. The algorithm is credited to Slowinski
of CRI.
FORTRAN program by Walt Colquitt and
Luke Welsh that found M110503. Optimized for vector machines
(supercomputers).
FORTRAN program by Luke Welsh to factor Mersenne
numbers. Written for vector machines (supercomputers). Named 'oiler' instead
of 'euler' because it ran on the NEC SX-2 in Houston, Texas. There are better
algorithms than the ones employed in this program.
Ports by Michiel van Loon of George Woltman's mprime to OS/2 and the EMX
32-bit DOS expander. To use the EMX version, you need the EMX runtime (v0.9c).
Related files
Mike McCarty's program to compute and print Mersenne numbers in decimal. Knowing
a good thing when he sees it, Mike calls Mikko Tommila's apfloat package (below).
This program is really fast. large.zip contains:
|
large.cc
|
C++ source for the apfloat package, runs in O(n log n) time, where n
is the number of digits in the prime
|
|
largefmt.c
|
a little program to format numbers
|
|
1000.dat
|
test output for 2^1000 - 1
|
|
large.c
|
computes large primes, algorithm O(n^2) where n is the number of digits
in the prime (written many moons ago)
|
Scripts written by David Nicol to automate a net-connected Linux
machine's participation in GIMPS. Requires perl, ash, mail, lynx,
and George Woltman's mprime packages.
extract.c
on ftp.delta.>
Transfer interrupted!