Mersenne Prime Freeware

"Share and Enjoy" -- The Amdahl 6's motto

Software for x86-style processors (Pentium, Athlon, & similar)

Go to the GIMPS homepage . George Woltman's programs are the fastest on Intel and AMD chips running Windows 3.x, Windows 95/98/NT, OS/2, DOS, Linux and UNIXWARE.

Software for Unix and non-x86

Currently the best programs for non-x86 CPUs are the following:

  • Ernst Mayer's Mlucas program
  • Guillermo Ballester Valor's Glucas program

  • Users should pick whichever gives the best performance on their hardware setup.

    Other Software

    (Note that some of these links may be dead, and much of the software is strictly of historical interest.)

    lucdwt.c on

    This is Dr. Richard Crandall's original Mersenne number testing program. Written in generic 'C'. George Woltman's lightning-fast Pentium program has its roots in this code.

    Reported to be OK

    mers on

    mers 6.50 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.
    README HTML file about mers package
    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'. Alternate site

    Landon Noll's implementation of The Amdahl 6 method to find humongous Mersenne-like primes. Needs the calc package (below) on this page.

    prime on

    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.

    pzilla.for on

    FORTRAN program by Walt Colquitt and Luke Welsh that found M110503. Optimized for vector machines (supercomputers).

    oiler.for on

    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.

    primeos2 3.3.1 and primeemx 3.3.1 on

    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) .

    OS/2Prime on

    by Marcel van de Vusse ( ) 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

    Related files

    ecm3 on

    DOS binary of GMP-ECM version 3. See the ECMNet homepage .

    mmfac on

    A DOS program for factoring M(M(p)) numbers written by Conrad Curry . See MMPstats.txt for a status of these numbers.

    genprost.tgz on

    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.

    mprint on the apfloat home page (Finland)

    For printing Mersenne numbers in arbitrary bases. Optimized for either 486 or Pentium. Written by Mikko Tommila .

    decimal expansion of Mersenne primes and their perfect numbers

    David Fred generated decimal expansions for all 37 known Mersenne primes and corresponding perfect numbers. This includes the source code, but requires GNU gmp math package.
    mersperf.tgz ~5MB Tarred and GZipped for UNIX users on ~5MB Zipped for DOS and Windows users on

    Libraries & developer oriented link

    gmp 2.0.2 from

    From the README:
    GNU MP is a library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers. It has a rich set of functions, and the functions have a regular interface. GNU MP is designed to be as fast as possible, both for small operands and for huge operands. The GMP homepage is at .

    freelip 1.1 on (Oxford)

    FreeLIP 1.1 - a free for non-commerical usage Large Integer Package. This software was originally written by Arjen K Lenstra but is now maintained by Paul Leyland ( ). Bug reports, ports to novel architectures, enhancements, suggestions, etc should be directed to pcl.

    Jörgs ugly HFLOAT page

    HUGE-FLOAT package for calculating very large floating point numbers.

    Jörgs ugly FXT page

    Jörgs has links and source code to various FFT and related algorithms

    apfloat on

    A C++ High Performance Arbitrary Precision Arithmetic Package by Mikko Tommila.

    calc on

    C-style arbitrary precision calculator.

    Thanks goes to... -- Revised: 3 April 2008 by Ernst Mayer