Mathematicians make a breakthrough on Gauss’s riddle, unsolved for 200 years

A solution to part of the Cohen-Lenstra conjecture helps resolve a long-standing mystery about quadratic forms

quadratic forms illustrated as glowing curved lines and spaces
billnoll / Getty

In his 1801 magnum opus Disquisitiones Arithmeticae, German mathematician Carl Friedrich Gauss wrote about a cyclical mystery. The puzzle involves quadratic forms, such as ax2 + bxy + cy2. Setting the form equal to a number fixes it into an equation that can be plotted on an x-y graph—something many of us learned to do on graphing calculators in high school.

Gauss described a method to combine two of these forms to produce a third. He called the operation a “composition.” Using the method, he combined a quadratic form we’ll call Q with itself to find a new form, Q2. Composing Q2 with Q again, he got a third form, Q3. But as he kept repeating the steps over and over, he found that, after a finite number of iterations, the composition cycled through all possible forms and reset to the original form, Q.

Gauss could see that the cycle reset regardless of his starting form, but he couldn’t find any sort of rule governing the cycle’s length. Until recently, neither could any other mathematicians.


On supporting science journalism

If 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.


In 1983 an idea inspired by Gauss’s discovery, the Cohen-Lenstra conjecture, claimed to be able to determine the average—not the exact—length of a cycle before it reset. That conjecture stood, generally accepted but unproven, for more than 40 years. Now Harvard University mathematician Aaron Landesman and Institute for Advanced Study Clay Research Fellow Ishan Levy have found a new framework that goes a long way toward proving it.

“This is a thing that many, many people work on,” says Melanie Wood, a mathematician at Harvard. It represents “a real breakthrough in our understanding of these types of questions.”

Also remarkable is that although the question focuses on a single topic—quadratic forms—the proof flows among different branches of math, drawing insights from across the mathematical kingdom, including statistics, geometry, algebra and a topic called homotopy theory, which studies what stays the same about a shape as you stretch and squish it like you would dough.

From Deterministic to Probabilistic

After more than 150 years of little progress, the first foothold in Gauss’s problem came in 1983, when French mathematician Henri Cohen and Dutch mathematician Hendrik Lenstra surprised their colleagues by conjecturing that the cycle reset could be explained using probability. The idea wasn’t entirely new; randomness is the force behind many profound ideas in number theory, including the twin prime conjecture and the Riemann hypothesis.

A computational number theorist, Cohen calculated enormous tables of quadratic compositions and was the first to spot a pattern hidden within. Lenstra supplied the theory explaining the existence of that pattern. They didn’t directly answer Gauss’s question but instead a narrower one involving prime numbers, which are only divisible by themselves and 1.

Pick a prime number, p, greater than 2, they wrote. Across all the families of related quadratic forms, how many take exactly p steps to reset? Cohen and Lenstra’s answer: on average, only one family—no matter which prime you picked. Their conjecture became one of three major conjectures that have since defined arithmetic statistics—the study of how collections of mathematical objects behave on average, even though no formula predicts how a single object behaves.

The next step came in 2009, when mathematicians Jordan Ellenberg, Akshay Venkatesh and Craig Westerland posted a preprint paper that claimed to prove a weaker version of the conjecture for every prime. Their work took place in the world of function fields—the geometric cousins to Gauss’s number-based approach. The paper was a tour de force, composed of sections that concerned seemingly unrelated areas of math. Landesman read the work when he was a graduate student at Stanford University. “It was the most amazing paper. Each section was its own field of math, and it was a very beautiful way that all these different ideas combined,” he says. “There was number theory, algebraic geometry, topology, a combinatorics section, homological algebra, probability.”

For Ellenberg, one of the paper’s authors, that’s the signature of a deep problem: it keeps resurfacing across unrelated fields. “All of math is like the Reese’s Peanut Butter Cup commercial,” he says. “You got your peanut butter in my chocolate. You got your chocolate in my peanut butter!”

The trio sensed they were close to something even bigger. The group completion theorem, an idea from homotopy theory, seemed to be saying exactly what they were trying to prove. The counterintuitive theorem is one of homtopy’s celebrated results. Think of “spaces” (a set of points, say, or braids) as a collection of LEGO bricks: You can “add” one brick to another by connecting them. You keep snapping more and more bricks together, and the theorem promises that, as the structure keeps growing, the underlying shape will eventually settle into a fixed, repeating pattern. Does that sound familiar?

In 2012 Ellenberg, Venkatesh and Westerland uploaded a new proof, but a year later a sharp-eyed colleague pinpointed a subtle flaw. The proof relied on certain sequences vanishing to zero and referenced the group’s 2009 paper. But the zero in the 2009 paper and the zero in the 2012 one weren’t the same. While the settings between the two looked pretty similar, they may as well have been zeros from different universes. The authors retracted their paper. In a blog post, Ellenberg wrote about the mistake with a widely praised philosophical openness. Famed Fields Medalist Terence Tao commented on Ellenberg’s post, “Ouch! I’ve had to issue a few errata myself with some non-trivial fixes in them.”

Patching a Proof

As a postdoc, Landesman set out to fix the flaw in the retracted paper. He thought the group completion theorem was the right tool, but he didn’t yet know how to wield it. So he reached out to a friend, Ishan Levy, who was then finishing his doctorate at the Massachusetts Institute of Technology. It was the first time Levy had heard the details of the Cohen-Lenstra conjecture. After understanding Landesman’s idea, he thought the method was doable. “I think, in mathematics, if you’re not optimistic, then you’re less likely to have a good idea to be able to prove it,” Levy says. “A lot of intuition from things I had already thought about would be applicable here.”

The pair got to work. Adopting the geometric translation pioneered in the retracted 2012 paper, they built matrices—grids of numbers arranged in rows and columns, similar to a spreadsheet—guided by the group completion theorem: one column for each space in a growing family of shapes; one row for each kind of hole running through it. If the Cohen-Lenstra conjecture was correct, the entries in each row—the counts of holes in the shapes—should settle to a fixed number, often zero.

The first row did exactly that. The second was murkier. The numbers climbed and then fell, with no obvious resting place. And before the researchers could push far enough to find out, the computation collapsed. The matrices grew so large that the computer simply couldn’t finish. “We weren’t able to see the stabilization,” Landesman says.

So the two started to push the numbers around by hand and in the partial data, they noticed a pattern. Certain pieces of the structure could be stripped away cleanly, leaving something simpler behind.

“We took that subset out, and then we found another subset,” Landesman says. “And we took that out. And we kept finding more and more subsets until we exhausted the spaces. That’s sort of the elementary description.”

Being able to interactively play with the data revealed subtle steps that informed their proof, which demonstrated that the sequences did indeed go to zero inside the same universe. The pair uploaded their fix for the retracted paper to the preprint server arXiv.org in 2024, and the solution is now widely accepted as correct.

The Secret Ingredient

But Levy felt uneasy. “We were doing a very, very subtle computation, and I worried that we may have made a slight error that breaks the whole proof,” he says. “In my opinion, a good mathematical proof is one where, once you see how it’s going to go, there’s no way it can possibly fail.”

After a month of mulling over the proof’s ideas, Levy clued in to the reason that their ad hoc method worked. He found that a certain algebraic gadget called a chain complex could describe the difference between the complicated geometry they actually cared about and the simple geometry it would eventually settle into. It was then possible to analyze this difference directly and show that it was zero. “It was exactly the way to see that these two are the same,” he says.

With their new framework in hand, Landesman and Levy turned to two more landmark conjectures in arithmetic statistics: the seemingly unrelated Poonen-Rains conjecture, which governs the statistics of elliptic curves—the math underlying modern encryption—and Malle’s conjecture, which predicts how often different symmetry types appear in all possible number systems. In two preprints, the pair proved function field versions of both conjectures.

Wood says the framework itself will prove useful to her and many others. “It will become a sort of standard,” she says. For Levy, the deeper lesson is the hidden power of homotopy theory. “It’s a field that is becoming more and more central within mathematics,” he says. “It will have more and more influence on many other fields.”

It’s Time to Stand Up for Science

If you enjoyed this article, I’d like to ask for your support. Scientific American has served as an advocate for science and industry for 180 years, and right now may be the most critical moment in that two-century history.

I’ve been a Scientific American subscriber since I was 12 years old, and it helped shape the way I look at the world. SciAm always educates and delights me, and inspires a sense of awe for our vast, beautiful universe. I hope it does that for you, too.

If you subscribe to Scientific American, you help ensure that our coverage is centered on meaningful research and discovery; that we have the resources to report on the decisions that threaten labs across the U.S.; and that we support both budding and working scientists at a time when the value of science itself too often goes unrecognized.

In return, you get essential news, captivating podcasts, brilliant infographics, can't-miss newsletters, must-watch videos, challenging games, and the science world's best writing and reporting. You can even gift someone a subscription.

There has never been a more important time for us to stand up and show why science matters. I hope you’ll support us in that mission.

Thank you,

David M. Ewalt, Editor in Chief, Scientific American

Subscribe