Thousands of computers across the world are currently scouring the number line in a scavenger hunt for rare mathematical gems. Prime number enthusiasts, looking for larger and larger numbers that are divisible only by 1 and themselves, muster vast amounts of computing power and algorithmic ingenuity in hopes of etching their name into the scrolls of math history.The latest entry comes from Luke Durant, a researcher in San Jose, Calif. Durant’s discovery overturned the former record holder, which sat uncontested for nearly six years, an unprecedentedly long reign in the modern search for ever larger prime numbers. The gap makes sense: as primes grow, they spread further apart, making each new find harder than the last.The new prime contains a mind-boggling 41,024,320 digits. To put that in perspective, the estimated number of atoms in the observable universe clocks in at around 80 digits. Every additional digit increases a number by 10 times, so the size of the new prime lives far beyond human intelligibility. Primes play a major role in pure math, where they’re main characters in a field called number theory, and in practice, where, for example, they underlie widely used encryption algorithms. A prime with 41 million digits won’t immediately join the ranks of useful numbers, but for now, it adds a feather in the cap of a community that longs to apprehend the colossal.On supporting science journalismIf you’re enjoying this article, consider supporting our award-winning journalism by subscribing. By purchasing a subscription you are helping to ensure the future of impactful stories about the discoveries and ideas shaping our world today.Durant’s success stems in part from new clever software from the Great Internet Mersenne Prime Search and in part from heavy-duty hardware and computational muscle that he personally mobilized for the pursuit. By assembling a “cloud supercomputer” spanning 17 countries, he ended a long tradition of personal computers discovering primes.Prime numbers are often called the “building blocks of math” because every whole number greater than 1 has a fingerprint as the product of a unique collection of primes. For example, 15 is the product of the primes 5 and 3, whereas 13 cannot be subdivided like this because 13 is prime. The study of these numbers dates back at least to the ancient Greeks. In 300 B.C.E. Euclid proved in his textbook Elements that infinitely many primes exist, and mathematicians, both professional and amateur, have relished the hunt for them ever since.While the first string of primes—2, 3, 5, 7, 11, and so on—is easy to find, the task gets considerably more challenging as the numbers get larger. For millennia, people found primes by hand—until 1951, when computers took over the search. But even silicon bounty hunters struggle to spot primes in the far reaches of the number line because testing the primality of an enormous number is nontrivial. To cope, researchers deploy every little optimization trick they can to speed up their tests or narrow their hunting ground, thereby boosting their chances of finding a new prime.Consider the number 99,400,891. How would you determine whether or not it’s prime? You could simply divide it by every smaller number and check if it has any divisors (in addition to 1 and itself). But that’s nearly 100 million cases to check for a relatively puny eight-digit number. You would save significant work by realizing that you don’t need to check every number up to the target, just the prime numbers. Why? You only need to find one divisor (one number that cleanly divides 99,400,891 with no remainder). We know that any nonprime divisor could be further broken down into its prime factors—if your target is divisible by 15, then it’s also divisible by the primes 5 and 3, so you only need to check the latter to determine primality. Further savings would come from the insight that you don’t need to check every smaller prime either, only those up to the square root of 99,400,891 (the number that when multiplied by itself gives you this eight-digit result). If none of those smaller primes divide it cleanly, then you can stop looking because the product of any two numbers larger than the square root of 99,400,891 will exceed it. These efficiency tricks slash our search drastically, from around 100 million numbers to only 1,228 (the number of primes less than the square root of 99,400,891). For those curious, 99,400,891 = 9,967 × 9,973, so it’s not prime.Those shortcuts did wonders for an eight-digit number, but how did Durant reach 41,024,320 digits? To graduate the search from the merely massive to the truly gargantuan, he and many other seekers focus on particular types of prime numbers. Mersenne primes, named for Marin Mersenne, the French theologian who studied them in the 17th century, take a special form. You get them by multiplying 2 by itself some number of times and then subtracting 1, as described in the equation 2n – 1. Mersenne noticed that when you plug in different values for n, you sometimes get a prime number. Specifically, 2n – 1 can only yield a prime when n itself is prime, and even then it’s not guaranteed. What makes Mersenne primes special from a prime hunter’s perspective is that we know a fast method (called the Lucas-Lehmer primality test) for checking whether numbers of the form 2n – 1 are prime. That test is much faster than any known general methods for numbers without that special form.The Lucas-Lehmer test fuels the Great Internet Mersenne Prime Search project, which launched in 1996 and enables any volunteer to download a free code that searches for Mersenne primes to run on their computers. The crowdsourced approach and the focus on Mersenne primes have proved successful. The seven largest known primes are all Mersenne primes and were all found by participants of the project. Note that smaller unknown primes certainly exist, but because we don’t know efficient methods for checking them, they’ll remain in the shadows for now.All told, project volunteers have found 18 new Mersenne primes, 17 of which owe their discovery to the personal computers of hobbyists. Durant, a 36-year-old former Nvidia engineer, just broke that streak. Nvidia, which recently briefly overtook Apple as the world’s most valuable company, designs specialty computer chips called graphics processing units (GPUs). As the name suggests, GPUs were originally invented to accelerate the rendering of graphics, but they also excel at other tasks involving highly parallelized computation, in which many processors run simultaneously to solve problems. Those problems include training neural networks such as GPT-4, mining cryptocurrency and, as it turns out, foraging for primes. Durant assembled a global supercomputer by buying processing time from various cloud GPU providers. At its peak, Durant’s project churned through about 12 times as many numbers as every other computer involved in the Mersenne prime search combined.In addition to the heavy-duty hardware, the Mersenne prime search software also got a notable upgrade since the last discovery. It replaced the superfast Lucas-Lehmer test for certifying Mersenne primes with a super-duper-fast probable prime test. Given a number to check, the latter test either confirms that it’s not prime or says that it’s probably prime. Probable primes have a very small chance of turning out to be nonprime. Only once a computer finds a probable prime do Mersenne prime search volunteers run the full-fledged Lucas-Lehmer test to remove any doubt. Durant’s new prime passed the probable prime test on October 11. Then, on October 19, a year after Durant started searching, independent tests by the Mersenne prime search confirmed that he had indeed found a needle in a haystack: 2136,279,841 – 1 is the largest known prime number.It exceeds the previous record holder by more than 16 million digits. If that didn’t earn enough glory, Durant has also unearthed the largest known “perfect number.” A perfect number equals the sum of its divisors (excluding itself); 6 is perfect because it’s divisible by 1, 2, 3 and equals the sum of 1 + 2 + 3. The second perfect number is 28. The 18th-century mathematician Leonhard Euler proved that every even perfect number can be generated from a Mersenne prime, so finding one promises a two-for-one deal on math discoveries.The well could dry up any time, though. We don’t know whether an infinite number of Mersenne primes (and therefore even perfect numbers) exist. Curiously, we don’t know whether any odd perfect numbers exist, a question that some call the oldest unsolved math problem.When asked how much money his project cost in an interview with Numberphile on YouTube, Durant said, “I believe it’s under $2 million.” That’s a hefty investment compared with the prime search project prize money of $3,000, which he plans to donate to the high school he attended, the Alabama School of Mathematics and Science. At this point, you might wonder why so many people spend their time and money trolling for primes that don’t have obvious real-world applications. In part, their efforts celebrate human curiosity and serve as a benchmark for our progress in mathematical computation. But I think the founder of the Mersenne prime search project, George Woltman, when asked this question in a Numberphile video, said it best: “It’s fun.”