A megaprime is a prime number with at least one million decimal digits.[1]

Other terms for large primes include "titanic prime", coined by Samuel Yates in the 1980s for a prime with at least 1000 digits[2] (of which the smallest is 10999+7),[3] and "gigantic prime" for a prime with at least 10,000 digits[4] (of which the smallest is 109999+33603).[5]

As of 18 April 2024, there are 2,657 known megaprimes[6] which have more than 1,000,000 digits.[7] The first to be found was the Mersenne prime 26972593−1 with 2,098,960 digits, discovered in 1999 by Nayan Hajratwala, a participant in the distributed computing project GIMPS.[8][9] Nayan was awarded a Cooperative Computing Award from the Electronic Frontier Foundation for this achievement.

Almost all primes are megaprimes, as the number of primes with fewer than one million digits is finite. However, the vast majority of known primes are not megaprimes.

All numbers from 10999999 through 10999999 + 593498 are known to be composite, and there is a very high probability that 10999999 + 593499, a strong probable prime for each of 8 different bases, is the smallest megaprime.[10] As of 2022, the smallest number known to be a megaprime is 10999999 + 308267*10292000 + 1.

The last prime that is not a megaprime is almost certainly 10999999 - 172473.[7][failed verification]