Mathematicians wanted to better understand these numbers that so closely resemble the most fundamental objects in number theory, the primes. It turned out that in 1899—a decade before Carmichael’s result—another mathematician, Alwin Korselt, had come up with an equivalent definition. He simply hadn’t known if there were any numbers that fit the bill.

According to Korselt’s criterion, a number *N* is a Carmichael number if and only if it satisfies three properties. First, it must have more than one prime factor. Second, no prime factor can repeat. And third, for every prime *p* that divides *N*, *p* – 1 also divides *N* – 1. Consider again the number 561. It’s equal to 3 × 11 × 17, so it clearly satisfies the first two properties in Korselt’s list. To show the last property, subtract 1 from each prime factor to get 2, 10 and 16. In addition, subtract 1 from 561. All three of the smaller numbers are divisors of 560. The number 561 is therefore a Carmichael number.

Though mathematicians suspected that there are infinitely many Carmichael numbers, there are relatively few compared to the primes, which made them difficult to pin down. Then in 1994, Red Alford, Andrew Granville, and Carl Pomerance published a breakthrough paper in which they finally proved that there are indeed infinitely many of these pseudoprimes.

Unfortunately, the techniques they developed didn’t allow them to say anything about what those Carmichael numbers looked like. Did they appear in clusters along the number line, with large gaps in between? Or could you always find a Carmichael number in a short interval? “You’d think if you can prove there’s infinitely many of them,” Granville said, “surely you should be able to prove that there are no big gaps between them, that they should be relatively well spaced out.”

In particular, he and his coauthors hoped to prove a statement that reflected this idea—that given a sufficiently large number *X*, there will always be a Carmichael number between *X* and 2*X*. “It’s another way of expressing how ubiquitous they are,” said Jon Grantham, a mathematician at the Institute for Defense Analyses who has done related work.

But for decades, no one could prove it. The techniques developed by Alford, Granville and Pomerance “allowed us to show that there were going to be many Carmichael numbers,” Pomerance said, “but didn’t really allow us to have a whole lot of control about where they’d be.”

Then, in November 2021, Granville opened up an email from Larsen, then 17 years old and in his senior year of high school. A paper was attached—and to Granville’s surprise, it looked correct. “It wasn’t the easiest read ever,” he said. “But when I read it, it was quite clear that he wasn’t messing around. He had brilliant ideas.”

Pomerance, who read a later version of the work, agreed. “His proof is really quite advanced,” he said. “It would be a paper that any mathematician would be really proud to have written. And here’s a high school kid writing it.”