
The Greek mathematician Euclid may have proved an infinite number of prime numbers around 300 BC. But recently, it was the British mathematician Christian Lawson Perfect who invented the computer game “Is this a prime number?”
Released five years ago, the game exceeded 3 million trials on July 16th. That is, after a surge of about 100,000 attempts in a Hacker News post, it reached 2,999,999 runs.
The purpose of this game is to classify as many numbers as possible into “prime” or “non-prime” in 60 seconds (Lawson-Perfect was first on the math blog The Aperiodical, where he is the founder and editor. As explained).
A prime number is an integer with exactly two divisors, 1 and itself.
“It’s very simple, but annoyingly difficult,” says Lawson Perfect, who works in the e-learning unit of Newcastle University’s Faculty of Mathematics and Statistics. He created the game in his spare time and proved useful at work. Lawson-Perfect creates e-assessment software (a system for assessing learning). “The system I create is designed to randomly generate math questions and receive answers from students, which automatically mark them and provide feedback,” he says. I will. “A prime game can be considered a kind of assessment” — he used it when conducting outreach sessions at school.
He made the game a bit easier with keyboard shortcuts (y and n keys click the corresponding yes-no button on the screen) to save mouse movement time.
Try it:
Prime number check algorithm
Prime numbers are practical in computing, such as error correction code and encryption. However, while prime factorization is difficult (and therefore its value in cryptography), prime factoring is easy, even in tricky cases. Fields Medal-winning German mathematician Alexander Grothendieck is notorious for mistaken 57 for a prime number (“Grotendique prime number”). Lawson-Perfect analyzed the game’s data and found that various numbers indicate a particular “Grothendieckyness”. 51 was most often mistaken for a prime number, followed by 57, 87, 91, 119, and 133. Lawson-Perfect’s nemesis (he also devised a convenient primality test service: https: //isthisprime.com/2).
The minimum algorithm for checking the prime numbers of numbers is trial division. Divide the number by all the numbers up to the square root (the product of two numbers greater than the square root is greater than the number in question).
However, this simple method is not very efficient and no other method has been devised over the centuries. As the German mathematician Carl Friedrich Gauss observed in 1801, “even the most timeless calculator requires unbearable effort.”
The game-coded algorithm Lawson-Perfect is called the Miller-Rabin Primitiveness Test (which is very efficient, but based on the non-iron-walled 17th-century method “Fermat’s Little Theorem”. Masu). The Miller-Rabin test works surprisingly well. As far as Lawson Perfect is concerned, it’s “basically magic”. “I’m not sure how it works, but I’m sure we can take the time to dig deeper,” he says.
The test uses randomness, so it produces probabilistic results. That sometimes means that the test lies. “You may find a scammer who is a composite number that is about to pass as a prime number,” says Carl Pomerance, a mathematician and book co-author at Dartmouth College. Prime number: Computational point of view.. However, the test is “quite safe” because the chances of a scammer evading the clever checking mechanism of the algorithm are probably one trillionth.
But as far as clever primality testing algorithms are concerned, the Miller-Rabin test is “the tip of the iceberg,” Pomerance says. In particular, 19 years ago, three computer scientists, Manindra Agrawar, Nirajukayal, and Nightin Saxena, all announced the AKS prime number test at the Indian Institute of Technology, Kanpur (also based on Fermat’s method). Masu). The numbers are prime numbers, there is no randomization, and they are (at least theoretically) impressive speeds. Unfortunately, AKS testing isn’t useful for practical purposes because it’s not always fast in theory.
Informal world record
However, practicality is not always important. From time to time, Lawson-Perfect receives emails from people who want to share their high scores in the game. Recently, the player reported a prime number of 60 in 60 seconds, but the record is likely to be 127 (Lawson-Perfect does not track high scores. He is computer-aided to generate spikes in the data. In an attempt, I know there are some scammers.)
The 127 score was achieved by Ravi Fernando, a graduate student in mathematics at the University of California, Berkeley. He posted the results in July 2020. This is still his personal best and he considers it an “unofficial world record”.
Fernando hasn’t played much of the game with default settings since last summer, but he tried customized settings, chose a larger number and allowed a longer time limit. He won 240 with a 5 minute limit. “This required a lot of guessing, as the numbers were in the high four-digit range and only memorized prime numbers were as low as 3,000,” he says. “I think some people still argue that it’s excessive.”
Fernando’s work is algebraic geometry and contains some prime numbers. But he states, “My research is more about why I quit the game than why I started it” (he got his PhD in 2014). Moreover, he thinks it will be very difficult to beat 127. “I feel right to stay on the record of prime numbers,” he said.
Is this number a prime number? There is a game for that.











