人工智能和算法的结合揭示了跨越两千年来π方程的隐藏结构。
作者:林迪·邱, 编辑:克拉拉·莫斯科维茨
Jeffrey Coolidge/Getty
庆祝圆周率日,并在我们的圆周率日专题页面 上了解这个数字在数学和科学领域的应用 。
两千多年来,数学家们为了更快计算π ,不断探索各种方法,积累了越来越多的π方程。这些方程的数量已达数千个,算法甚至可以生成无穷多个。每一项发现都像是孤立的碎片,与其他发现之间似乎并无关联。但现在,几个世纪以来积累的π公式首次被揭示为一个统一的、此前不为人知的结构。
用圆的周长除以直径,就能得到圆周率π。但是,π的具体数字是多少呢?测量圆的周长并不能告诉你答案——你的工具太笨重,无法揭示π的无穷大数字。要揭示它的真正值,需要更强大的工具:公式。
这一切都始于阿基米德,他提出了世界上第一个已知的π值的数学证明。他将圆视为边长为零的无限多边形。处理无穷小的数学(微积分)还要再过1900年才会出现,所以他转而将圆的外切面和内切面各为96边形,并利用几何学计算它们的周长。他由此确定π的值介于3.140845…和3.142857…之间,将其限制在一个范围内。他的严谨性保持了1600年之久。
大约在14世纪,印度数学家桑伽玛格拉玛的马达瓦给出了第一个精确的π公式,它以无穷级数的形式表示——一个由无数项组成的级数,如果能将它们全部加起来,就能精确地得到π。但问题是:他的级数收敛速度极其缓慢,需要数百项才能精确到小数点后几位。三百多年后,莱昂哈德·欧拉发现了另一个收敛速度更快的级数。到了20世纪初,数学家斯里尼瓦萨·拉马努金提出的公式,至今仍因其高效性而备受推崇。
Amanda Montañez;来源:“从欧拉到人工智能:数学常数的统一公式”,作者:Tomer Raz 等人,预印本于 2025 年 11 月 16 日发布于https://arxiv.org/pdf/2502.17533(参考文献)
每个公式看起来都与其他公式毫不相干。但在2025年末,以色列理工学院(Technion)一个由七名人工智能研究人员组成的团队发现了一种此前未知的数学结构,这种结构隐藏在数百个π公式背后,其中包括阿基米德、欧拉和拉马努金的公式。“能引用阿基米德的公式可不是每天都有的机会,”该团队的博士生迈克尔·沙利特(Michael Shalyt)说道。这种被称为保守矩阵场(CMF)的结构,就像一个数学上的共同祖先,揭示了看似毫不相干的公式实际上是同一个底层对象的不同表达方式。
该项目源于小组负责人伊多·卡米纳 (Ido Kaminer) 于 2019 年开发的“拉马努金机器”(Ramanujan Machine),这是一个人工智能机器人,旨在寻找计算数学常数的新猜想。任何人都可以免费下载该软件,许多人已经利用它找到了新的 π 公式,加入了拉马努金的行列。尽管数学家们并未完全接受,但该机器人的非传统方法却取得了巨大的成功。“当我们开始在这个数学领域进行人工智能研究时,”卡米纳说,“这被认为是一个边缘化的想法。”
但随着机器和其他数学家不断推导出各种公式,最终这个问题变得不可避免:它们之间是否有联系?
这个团队成员都拥有物理和数学等领域的背景,他们像实验学家一样研究这个问题,决定收集数据集。当时在以色列理工学院攻读硕士学位的托默·拉兹编写了一段代码,用于下载所有上传到预印本服务器arXiv.org的数学论文。他每周七天、每天24小时不间断地运行笔记本电脑,持续六周,最终以足够慢的速度下载了455,050篇论文,以避免超出网站的下载限制。
随后,该团队将 GPT-4o 与专门的算法结合使用,以检测与 π 相关的公式,将其转换为可执行代码,并去除无关的重复项。他们从近 50 万篇论文中提取了 385 个独特的公式,其中约 10% 源自拉马努金机器。
接下来,他们将这385个方程改写成相同的形式——一种特殊的无穷级数。但这些表达式仍然全部收敛于π,因此没有明显的比较方法。他们需要更深入的分析。
那个东西就是CMF,是卡米纳团队的一些成员在2023年提出的。沙利特称它为数学界的瑞士军刀。“它可以统一两千年前的公式,并为数学中的常数建立层级关系,我们希望用它来证明一些与黎曼猜想相关的无理性性质,”他说。
可以将CMF想象成定义在网格上的引力。每个 π 公式在网格上都描绘出一条不同的路径。正如引力场保证两点之间的能量差与路径无关一样,CMF 保证只有终点才重要。从这一约束条件出发,一个非凡的结论浮现出来:当两个 π 公式在同一个 CMF 网格上描绘出平行路径时,它们是等价的(一个可以转化为另一个),无论它们表面上看起来多么不同。
研究小组推导出了π的CMF(关键矩阵),然后利用算法确定每个公式在网格中的位置,从而找到相似公式的集合。算法正式证明了一组公式是否属于该CMF。结果显示:所有已知的π公式中,43%源自同一个CMF。另有51%属于更广泛的公式集合。(研究人员仍在研究它们之间的具体关系。)只有6%的公式是孤立的,没有证据表明它们与其他任何公式存在关联。
卡米纳表示,更复杂的CMF能否涵盖所有方程组,目前尚无定论。另一个悬而未决的问题是,CMF生成的每个方程是否都是π公式——到目前为止,团队尝试过的所有方程都有效。
大卫·贝利是一位退休的计算机科学家,曾就职于劳伦斯伯克利国家实验室,他没有参与这项研究(尽管π公式以他的名字命名,而且该小组使用了他的一个算法),他说,该项目的结果就好像17世纪的化学家们一直在逐一发现原子元素,“然后突然之间,有人发布了一个计算机程序,自动构建了整个元素周期表”。
宾夕法尼亚州立大学荣誉退休数学教授乔治·安德鲁斯(他曾因发现拉马努金遗失的大量笔记而闻名)此前曾批评该团队以拉马努金的名字命名他们的机器。但他对目前的工作赞不绝口。“这是以严谨的方式进行的严肃数学研究,”他说。“未来应该会有更多令人惊讶的结果出现。”
LYNDIE CHIOU是一位科学家、科学作家,也是科学会议网站ZeroDivZero的创始人。她的文章也曾发表在《天空与望远镜》杂志上。您可以在Xbox上关注她: @lyndie_chiou
Mathematicians find one pi formula to rule them all
A mixture of AI and algorithms uncovered a hidden structure spanning 2,000 years of equations for pi
BY LYNDIE CHIOU EDITED BY CLARA MOSKOWITZ
Jeffrey Coolidge/Getty
Math
Celebrate Pi Day and read about how this number pops up across math and science on our special Pi Day page.
For more than two millennia, mathematicians have produced a growing heap of pi equations in their ongoing search for methods to calculate pi faster and faster. The pile of equations has grown into the thousands, and algorithms now can generate an infinitude. Each discovery has arrived alone, as a fragment, with no obvious connection to the others. But now, for the first time, centuries of pi formulas have been shown to be part of a unified, formerly hidden structure.
Divide any circle’s circumference by its diameter and you get pi. But what, exactly, are its digits? Measuring physical circles won’t tell you—your tools are too clunky to discover pi’s endless numerals. Uncovering its true value requires something much more powerful: a formula.
It all started with Archimedes, who developed the world’s first known mathematical proof for pi’s value. He thought of a circle as an infinite-sided polygon with sides of zero length. The math to handle infinitesimals (calculus) wouldn’t arrive for another 1,900 years, so instead he circumscribed 96-sided polygons on the outside and inside of a circle and used geometry to calculate their perimeters. He was able to determine that pi fell somewhere between 3.140845... and 3.142857..., trapping it in a range. His rigor stood for 1,600 years.
Then, around the 14th century, Indian mathematician Madhava of Sangamagrama provided the first exact formula, expressed as an infinite series—a sum of endlessly many terms that, if you could somehow add them all up, would yield pi exactly. The catch: his series converged agonizingly slowly, requiring hundreds of terms just to nail down a few decimal places. More than three hundred years later Leonhard Euler discovered another series that converged faster. And in the early 1900s, the mathematician Srinivasa Ramanujanproduced formulas that are still revered for their efficiency today.
Amanda Montañez; Source: “From Euler to AI: Unifying Formulas for Mathematical Constants,” by Tomer Raz et al. Preprint posted November 16, 2025 to https://arxiv.org/pdf/2502.17533 (reference)
Each equation seemed unrelated to the others. But in late 2025, a team of seven AI researchers at the Technion–Israel Institute of Technology found a previously unknown mathematical structure underlying hundreds of pi formulas, including those of Archimedes, Euler and Ramanujan. “It’s not every day that you get to cite Archimedes,” says Ph.D. student Michael Shalyt, part of the team. The structure, called a conservative matrix field, or CMF, acts as a kind of mathematical common ancestor, showing how formulas that look nothing alike turn out to be different expressions of the same underlying object.
More From This Report
- How to find pi in randomness all around you
EMMA R. HASSON
- Which Thanksgiving Pie Causes the Biggest Blood Sugar Spike: Pecan, Apple or Pumpkin?
TANYA LEWIS
- How an Error in Cult Classic Game Doom Sparked New Appreciation for Pi
MANON BISCHOFF
- Math Enthusiasts Unite to Have Rover Calculate Pi on the Moon
EMMA R. HASSON
View the Report
The project grew out of group head Ido Kaminer’s 2019 Ramanujan Machine, an AI bot that seeks out new conjectures for calculating mathematical constants. Anyone can download the software for free, and many have used it to find new pi formulas to join the heap. The bot’s unconventional approach was a viral success, if not taken entirely seriously by mathematicians. “When we started doing AI research in this area of math,” Kaminer says, “it was seen as a fringe idea.”
But as the machine and other mathematicians kept churning out formulas, eventually the question became unavoidable: Were any of them connected?
The group, who also have backgrounds in areas such as physics and math, approached the problem like experimentalists and decided to gather a dataset. Tomer Raz, then a master’s student at Technion, wrote code to download every math paper that had ever been uploaded to the preprint server arXiv.org, running his laptop seven days a week, 24 hours a day, for six weeks to download 455,050 papers at a slow enough rate to respect the website’s limit.
The group then deployed GPT-4o in combination with specialized algorithms to detect pi-related equations, translate them into executable code, and remove trivial duplicates. From nearly half a million papers, they extracted 385 unique formulas, including about 10 percent that originated from the Ramanujan Machine.
For the next step, they recast the 385 equations into the same format—a special type of infinite series. But the expressions still all converged to pi, leaving no obvious way to compare them. Something deeper was needed.
That something was the CMF, which some members of Kaminer’s group had introduced in 2023. Shalyt calls it a Swiss army knife for mathematics. “It can unify 2,000-year-old formulas [and] give hierarchy for constants in math, and we hope to [use it to] prove some properties of irrationality related to the Riemann hypothesis,” he says.
Think of the CMF like gravity defined on a grid. Each pi formula traces a different path across the grid. Just as a gravitational field guarantees that the energy difference between two points is the same, regardless of route, the CMF guarantees that only the destination matters. From this single constraint, something remarkable emerges: when two pi formulas trace parallel paths through the same CMF grid, they are equivalent (one can be transformed into the other), however mismatched they appear on the surface.
The group derived the CMF of pi, then used algorithms to see where each formula fit inside the grid, finding clusters of similar equations. An algorithm formally proved whether a cluster of equations belonged to the CMF. The result: 43 percent of all known pi formulas descend from a single CMF. Another 51 percent belong to broader clusters. (The researchers are still working out their precise relationships.) Only 6 percent of the formulas remain orphans, with no proven connection to anything else.
It’s an open question whether a more complex CMF could capture the entire set, Kaminer says. Another open question is whether every single equation generated from the CMF is a pi formula—so far, all the equations the team has tried have worked.
David Bailey, a retired computer scientist formerly at Lawrence Berkeley National Laboratory, who wasn’t involved in the study (though a pi formula bears his name and the group used one of his algorithms), says the project’s results are as if 17th-century chemists had been discovering atomic elements one by one “and then all of a sudden, someone let loose a computer program that constructed the whole periodic table automatically.”
Mathematician George Andrews, a professor emeritus at the Pennsylvania State University (who famously uncovered a lost trove of Ramanujan’s notes) had previously criticized the group for naming their machine after Ramanujan. But he had nothing but praise for the current work. “This is serious mathematics done in a serious way,” he says. “More and more surprising things should emerge.”
Join the discussion: What is the nerdiest or most unusual way you or someone you know has celebrated Pi Day?
This year people in Scientific American’s New York office brought in pies ahead of Pi Day, but we know there must be stranger and more interesting ways to celebrate the iconic number. How have you or people you know celebrated Pi Day? What are the most interesting ways pi comes up in your work or everyday life? Is there another number you think deserves more attention?
Discussions
What is the nerdiest or most unusual way you or someone you know has celebrated Pi Day?
This year people in Scientific American’s New York office brought in pies ahead of Pi Day, but we know there must be stranger and more interesting ways to celebrate the iconic number. How have you or people you know celebrated Pi Day? What are the most interesting ways pi comes up in your work or everyday life? Is there another number you think deserves more attention?
Join the Discussion
RIGHTS & PERMISSIONS
LYNDIE CHIOUis a scientist, a science writer and founder of ZeroDivZero, a science conference website. Her writing has also appeared in Sky & Telescope. Follow her on X @lyndie_chiou
More by Lyndie Chiou
热门跟贴