Prime95

Last updated
Prime95
Developer(s) George Woltman
Initial release3 January 1996;28 years ago (1996-01-03)
Stable release
30.19 build 13 [1] / March 7, 2024;37 days ago (2024-03-07)
Preview release
30.19 build 14 [2] / March 30, 2024;14 days ago (2024-03-30)
Written in ASM, C
Operating system Microsoft Windows, macOS, Linux, FreeBSD
Type Mersenne prime finder / system stability tester
License Freeware [3]
Website mersenne.org   OOjs UI icon edit-ltr-progressive.svg

Prime95, also distributed as the command-line utility mprime for FreeBSD and Linux, is a freeware application written by George Woltman. It is the official client of the Great Internet Mersenne Prime Search (GIMPS), a volunteer computing project dedicated to searching for Mersenne primes. It is also used in overclocking to test for system stability. [4]

Contents

Although most [5] of its source code is available, Prime95 is not free and open-source software because its end-user license agreement [3] states that if the software is used to find a prime qualifying for a bounty offered by the Electronic Frontier Foundation, [6] then that bounty will be claimed and distributed by GIMPS.

Finding Mersenne primes by volunteer computing

Prime95 tests numbers for primality using the Fermat primality test (referred to internally as PRP, or "probable prime"). For much of its history, it used the Lucas–Lehmer primality test, but the availability of Lucas–Lehmer assignments was deprecated in April 2021 [7] to increase search throughput. Specifically, to guard against faulty results, every Lucas–Lehmer test had to be performed twice in its entirety, while Fermat tests can be verified in a small fraction of their original run time using a proof generated during the test by Prime95. Current versions of Prime95 remain capable of Lucas–Lehmer testing for the purpose of double-checking existing Lucas–Lehmer results, and for fully verifying "probably prime" Fermat test results (which, unlike "prime" Lucas–Lehmer results, are not conclusive).

To reduce the number of full-length primality tests needed, Prime95 also implements other, computationally simpler tests designed to filter out unviable candidates; as of 2021, this mainly comprises Pollard's p – 1 algorithm. The elliptic-curve factorization method and Williams's p + 1 algorithm are implemented, but are considered not useful at modern GIMPS testing levels, and mostly used in attempts to factor much smaller Mersenne numbers that have already undergone primality testing. Prime95 implements trial division, but because this type of work can be executed using single-precision arithmetic (as opposed to the double-precision arithmetic required by other GIMPS work types), almost all GIMPS trial division is done by third-party clients implementing GPU computation for its comparatively much greater single-precision throughput.

GIMPS has discovered 17 new Mersenne primes since its foundation in 1996, all using Prime95. [8] Each was the largest known prime number at the time of its discovery, except M37156667 and M42643801, which were discovered out of order from the larger M43112609. [9]

Use for stress testing

Prime95 28.7 running a stress test on an Intel quad-core Windows 10 system Prime95 28.7 quad-core.png
Prime95 28.7 running a stress test on an Intel quad-core Windows 10 system

To maximize search throughput, most of Prime95 is written in hand-tuned assembly, which makes its system resource usage much greater than most other computer programs. Additionally, due to the high precision requirements of primality testing, the program is very sensitive to computation errors and proactively reports them. These factors make it a commonly used tool among overclockers to check the stability of a particular configuration. [4]

See also

Related Research Articles

<span class="mw-page-title-main">Great Internet Mersenne Prime Search</span> Volunteer project using software to search for Mersenne prime numbers

The Great Internet Mersenne Prime Search (GIMPS) is a collaborative project of volunteers who use freely available software to search for Mersenne prime numbers.

In mathematics, a Mersenne prime is a prime number that is one less than a power of two. That is, it is a prime number of the form Mn = 2n − 1 for some integer n. They are named after Marin Mersenne, a French Minim friar, who studied them in the early 17th century. If n is a composite number then so is 2n − 1. Therefore, an equivalent definition of the Mersenne primes is that they are the prime numbers of the form Mp = 2p − 1 for some prime p.

<span class="mw-page-title-main">Prime number</span> Number divisible only by 1 or itself

A prime number is a natural number greater than 1 that is not a product of two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number. For example, 5 is prime because the only ways of writing it as a product, 1 × 5 or 5 × 1, involve 5 itself. However, 4 is composite because it is a product (2 × 2) in which both numbers are smaller than 4. Primes are central in number theory because of the fundamental theorem of arithmetic: every natural number greater than 1 is either a prime itself or can be factorized as a product of primes that is unique up to their order.

In number theory, Fermat's little theorem states that if p is a prime number, then for any integer a, the number apa is an integer multiple of p. In the notation of modular arithmetic, this is expressed as

In mathematics, the Lucas–Lehmer test (LLT) is a primality test for Mersenne numbers. The test was originally developed by Édouard Lucas in 1878 and subsequently proved by Derrick Henry Lehmer in 1930.

<span class="mw-page-title-main">D. H. Lehmer</span> American mathematician (1905-1991)

Derrick Henry "Dick" Lehmer, almost always cited as D.H. Lehmer, was an American mathematician significant to the development of computational number theory. Lehmer refined Édouard Lucas' work in the 1930s and devised the Lucas–Lehmer test for Mersenne primes. His peripatetic career as a number theorist, with him and his wife taking numerous types of work in the United States and abroad to support themselves during the Great Depression, fortuitously brought him into the center of research into early electronic computing.

<span class="mw-page-title-main">George Woltman</span> American mathematician

George Woltman is the founder of the Great Internet Mersenne Prime Search (GIMPS), a distributed computing project researching Mersenne prime numbers using his software Prime95. He graduated from the Massachusetts Institute of Technology (MIT) with a degree in computer science. He lives in North Carolina. His mathematical libraries created for the GIMPS project are the fastest known for multiplication of large integers, and are used by other distributed computing projects as well, such as Seventeen or Bust.

In mathematics, a double Mersenne number is a Mersenne number of the form

In mathematics, the irrational base discrete weighted transform (IBDWT) is a variant of the fast Fourier transform using an irrational base; it was developed by Richard Crandall, Barry Fagin and Joshua Doenias in the early 1990s using Mathematica.

Richard Peirce Brent is an Australian mathematician and computer scientist. He is an emeritus professor at the Australian National University. From March 2005 to March 2010 he was a Federation Fellow at the Australian National University. His research interests include number theory, random number generators, computer architecture, and analysis of algorithms.

John Lewis Selfridge, was an American mathematician who contributed to the fields of analytic number theory, computational number theory, and combinatorics.

<span class="mw-page-title-main">Largest known prime number</span>

The largest known prime number is 282,589,933 − 1, a number which has 24,862,048 digits when written in base 10. It was found via a computer volunteered by Patrick Laroche of the Great Internet Mersenne Prime Search (GIMPS) in 2018.

In computational number theory, a variety of algorithms make it possible to generate prime numbers efficiently. These are used in various applications, for example hashing, public-key cryptography, and search of prime factors in large numbers.

The Baillie–PSW primality test is a probabilistic or possibly deterministic primality testing algorithm that determines whether a number is composite or is a probable prime. It is named after Robert Baillie, Carl Pomerance, John Selfridge, and Samuel Wagstaff.

Riesel Sieve was a volunteer computing project, running in part on the BOINC platform. Its aim was to prove that 509,203 is the smallest Riesel number, by finding a prime of the form k × 2n − 1 for all odd k smaller than 509,203.

In mathematics, the Lucas–Lehmer–Riesel test is a primality test for numbers of the form N = k ⋅ 2n − 1 with odd k < 2n. The test was developed by Hans Riesel and it is based on the Lucas–Lehmer primality test. It is the fastest deterministic algorithm known for numbers of that form. For numbers of the form N = k ⋅ 2n + 1, either application of Proth's theorem or one of the deterministic proofs described in Brillhart–Lehmer–Selfridge 1975 are used.

The Lehmer random number generator, sometimes also referred to as the Park–Miller random number generator, is a type of linear congruential generator (LCG) that operates in multiplicative group of integers modulo n. The general formula is

In mathematics, the Pocklington–Lehmer primality test is a primality test devised by Henry Cabourn Pocklington and Derrick Henry Lehmer. The test uses a partial factorization of to prove that an integer is prime.

References

  1. "GIMPS - Free Prime95 software downloads - PrimeNet". www.mersenne.org. Archived from the original on 2023-02-03. Retrieved 2023-02-04.
  2. Woltman, George (2023-10-04). "mersenneforum.org - View Single Post - ECM users - version 30.9-30.18 (see post #465 & #398)". mersenneforum.org. Archived from the original on 2023-10-27. Retrieved 2023-10-27.
  3. 1 2 "How To Run a CPU Stress Test Using Prime95". Appuals.com. 2015-12-10. Retrieved 2019-05-23.
  4. Woltman, George. "The security code or checksum is hard to forge. This is the only source code that is not published".
  5. "EFF Cooperative Computing Awards". Electronic Frontier Foundation. 2008-02-29. Retrieved 2019-05-08.
  6. Woltman, George (2021-04-08). "First time LL is no more".
  7. "GIMPS History - PrimeNet". Great Internet Mersenne Prime Search. Retrieved 2019-05-09.
  8. "GIMPS Milestones". www.mersenne.org. Retrieved 2021-10-17.
  1. "Torture test your CPU with Prime95". www.playtool.com. Retrieved 2022-09-15.