A Very Large Prime Number

A very large prime number is a prime number containing thousands, millions, or tens of millions of decimal digits. Because Euclid proved that infinitely many prime numbers exist, there is no single largest prime. However, discovering increasingly large primes remains an active area of computational mathematics.

The Current Record: As of August 2026, the largest known prime number is the Mersenne prime 2136,279,841 - 1 (also designated as M136279841). It has 41,024,320 decimal digits and was discovered by former Nvidia engineer Luke Durant using the Great Internet Mersenne Prime Search (GIMPS) and a worldwide network of cloud GPUs.

Why Are Almost All Record Primes Mersenne Primes?

A Mersenne number has the form Mn = 2n - 1, where n is a positive integer. If a Mersenne number is prime, its exponent must also be prime, so Mersenne-prime candidates are usually written Mp. Virtually all record-breaking primes discovered in the computer era belong to this family. There are two primary reasons why:

  • The Lucas-Lehmer Test: There exists an exceptionally fast, deterministic primality test specifically tailored for Mersenne numbers. Unlike general primality tests which become computationally prohibitive for multi-million digit candidates, the Lucas-Lehmer test determines primality in polynomial time with relatively low constant factors.
  • Binary Hardware Efficiency: In binary arithmetic, 2p - 1 is simply a continuous string of p ones. Multiplication and modulo operations can be carried out with extreme efficiency using Fast Fourier Transforms (FFTs) optimized for modern CPUs and GPUs.

Milestones in the History of Record Primes

The record for the largest known prime has advanced over centuries, progressing from hand calculation to global distributed computing networks.

Year Discoverer Prime Number / Expression Digits
1588 Pietro Cataldi 219 - 1 (524,287) 6
1772 Leonhard Euler 231 - 1 (2,147,483,647) 10
1876 Édouard Lucas 2127 - 1 39
1952 Raphael M. Robinson 2521 - 1 (First on a digital computer) 157
1961 Alexander Hurwitz 24423 - 1 1,332
1996 GIMPS / Joel Armengaud 21,398,269 - 1 420,921
2008 GIMPS / Edson Smith & UCLA 243,112,609 - 1 (First > 10M digits) 12,978,189
2018 GIMPS / Patrick Laroche 282,589,933 - 1 24,862,048
2024 GIMPS / Luke Durant 2136,279,841 - 1 41,024,320

How Massive Primes Are Found

Searching for gigantic prime numbers requires a blend of advanced mathematics, distributed computing, and rigorous verification techniques:

  • Distributed Volunteer Grids: Projects like GIMPS (Great Internet Mersenne Prime Search) and PrimeGrid coordinate thousands of computers across the world to test candidate exponents in parallel.
  • GPU Acceleration: Modern searches utilize GPU compute systems (such as OpenCL and CUDA), whose parallelism can substantially accelerate Fast Fourier Transform calculations compared with a single-threaded CPU implementation. The exact gain depends on the hardware and software.
  • Probable Prime (PRP) Testing: Since 2020, GIMPS has preferred error-checked Fermat PRP tests with proof files for first-time primality tests. The proof file can be verified far faster than repeating the original test. If a candidate produces the rare probable-prime result, independent Lucas-Lehmer tests then confirm its primality.
  • Independent Verification: Once a candidate passes the test, independent hardware architectures verify the result using different software packages to ensure no hardware glitch or memory corruption generated a false positive.

Practical Applications of Large Primes

While multi-million digit primes are primarily objects of pure mathematical research, moderately large primes (consisting of hundreds to thousands of bits) are essential to digital cryptography:

  • Public-Key Cryptography (RSA): The RSA cryptosystem relies on the asymmetry between multiplication and factorization: multiplying two appropriately generated primes is fast, whereas factoring their product is computationally infeasible with known classical algorithms when a sufficiently large key size is used.
  • Diffie-Hellman Key Exchange: Traditional finite-field Diffie-Hellman uses a large prime modulus to establish a shared secret over an insecure public channel without transmitting the secret itself.
  • Hardware Stress Testing: The intense computational demands of prime-searching software (such as Prime95) make these programs standard industry tools for stress-testing computer processors, memory modules, and system stability.
  • Algorithmic Innovation: Pushing the limits of big integer arithmetic drives improvements in fast multiplication algorithms, discrete Fourier transforms, and distributed computing architectures.

Cooperative Computing Awards

The Electronic Frontier Foundation (EFF) established cash prizes to stimulate distributed computing and the search for very large prime numbers:

  • $50,000 Award: For the first prime with at least 1,000,000 digits (won in 2000 by GIMPS/Nayan Hajratwala).
  • $100,000 Award: For the first prime with at least 10,000,000 digits (the qualifying prime was discovered in 2008 by GIMPS/UCLA, and the award was presented in 2009).
  • $150,000 Award: For the first prime with at least 100,000,000 digits (currently unclaimed).
  • $250,000 Award: For the first prime with at least 1,000,000,000 digits (currently unclaimed).

Read our full guide to prime number money prizes for complete details on active bounties and how to participate.

Example of a Large Prime Number

Below is the complete 2,917-digit prime number 29689 - 1 (the 21st Mersenne prime, discovered in 1963 on the ILLIAC II computer), written out in full:

Tip: You can click the box to select the whole number.

Test Large Primes

Use our Prime Number Check for integers up to 20,000 decimal digits. You can paste large numbers, including multi-thousand-digit values like the example above, directly into the checker. Small inputs return immediately, while very large inputs may take seconds or minutes and display live progress.

Sources & Further Reading

  1. Wikipedia: Largest known prime number - Complete chronological history of record prime numbers from ancient times to current discoveries.
  2. Wikipedia: Great Internet Mersenne Prime Search - Organizational structure, computing methodologies, and historical milestones of GIMPS.
  3. Wikipedia: Lucas-Lehmer primality test - Deterministic algorithm specifically designed for Mersenne numbers.
  4. GIMPS Official Website - Discovery announcements, verification statistics, and software downloads for distributed prime searching.
  5. Electronic Frontier Foundation: Cooperative Computing Awards - Official rules, prize tiers, and history of EFF awards for large prime discoveries.
  6. The Prime Pages (University of Tennessee at Martin) - Database of the 5,000 largest known primes and number theory records maintained by Chris Caldwell.