Can π generate itself? A Monte Carlo analysis of 314 trillion digits — π 能生成自己吗?基于 314 万亿位数字的蒙特卡洛分析
π 能生成自己吗?基于 314 万亿位数字的蒙特卡洛分析 本文附英文原文(arXiv 全文/PDF 提取)与中文深度解读。
原文:Can π generate itself? A Monte Carlo analysis of 314 trillion digits,作者 Alessandro Razeto, Nicola Rossi (INFN)。 本页结构:第一部分为英文原文(Original Article),第二部分为中文深度解读(解析)。 说明:原文无付费墙,全文完整收录(来自 arXiv HTML 或 PDF 文本提取,公式以 LaTeX 呈现)。
第一部分:正文(Original Article)
Can
\[\pi\]generate itself? A Monte Carlo analysis of 314 trillion digits
Alessandro Razeto
Affiliation: Laboratori Nazionali del Gran Sasso (INFN), Via G. Acitelli, 22 67100 Assergi L’Aquila, Italy
Nicola Rossi
Affiliation: Laboratori Nazionali del Gran Sasso (INFN), Via G. Acitelli, 22 67100 Assergi L’Aquila, Italy
August 11, 2026
Abstract
At the end of 2025, a record computation of
\[\pi\]reached 314 trillion decimal digits, providing the largest numerical dataset ever generated for this constant. We exploit this unprecedented dataset to investigate whether the digits of
\[\pi\]themselves can serve as a source of pseudorandom numbers for estimating
\[\pi\]through the simplest Monte Carlo method. Our results go beyond the normality hypothesis by providing empirical evidence of a high degree of statistical randomness in the available digits, although not of digit independence, which cannot hold for a deterministic sequence. By optimizing the mapping of the digit sequence into Monte Carlo samples, we obtain the highest precision allowed by the dataset. As predicted, the method successfully reproduces the first sequence of decimal digits, demonstrating that the largest available dataset of
\[\pi\]digits can be used to recover
\[\pi\approx 3.141593\]through Monte Carlo simulation.
1 Introduction
The decimal expansion of
\[\pi\]has fascinated mathematicians for centuries, not only because of its fundamental role in mathematics and the physical sciences, but also because of its remarkable statistical properties [[1], [2]]. Although
\[\pi\]is a deterministic irrational and transcendental number, its decimal digits appear to behave as if they were generated by a random process. This apparent randomness has motivated extensive theoretical and computational studies aimed at understanding the statistical nature of its decimal expansion.
A central open question concerns the normality of
\[\pi\]. A real number is said to be normal in base
\[b\]if every finite sequence of
\[k\]digits occurs with the expected limiting frequency
\[b^{-k}\]. In base 10, this implies that each digit appears asymptotically with frequency
\[1/10\], every pair of digits with frequency
\[1/100\], and, more generally, every block of length
\[k\]with frequency
\[10^{-k}\]. Although Borel proved that almost all real numbers are normal in the measure-theoretic sense [[3], [4], [5]], establishing the normality of specific mathematical constants remains one of the outstanding problems in number theory. In particular, no proof is currently known for
\[\pi\], despite extensive numerical evidence supporting this conjecture [[6], [7]].
\[x\] \[y\] \[N_{\rm in}\] \[N_{\rm out}\] \[r=1\]_Figure 1: Illustration of the Monte Carlo estimation of
\[\pi\]. Random points are uniformly generated inside the unit square. Points satisfying
\[x^{2}+y^{2}\leq 1\](blue) lie inside the quarter unit circle, whereas the remaining points (red) fall outside. The ratio of the two areas yields
\[\pi\simeq 4N_{\rm in}/N\]. _
The continuous increase in the number of computed digits of
\[\pi\]has enabled increasingly stringent statistical tests of its decimal expansion. At the end of 2025, a new computational record reached 314 trillion decimal digits, providing by far the largest dataset ever available for this constant [[8], [9]]. Statistical analyses performed on smaller dataset showed excellent agreement with the predictions expected for a normal number, although finite computations can never constitute a mathematical proof [[10]].
An alternative way to investigate the statistical properties of a sequence is to employ it in stochastic numerical algorithms. Among these, the Monte Carlo estimation of
\[\pi\]is one of the simplest and most widely known examples [[11], [12], [13]]. Consider the unit square
\[[0,1]\times[0,1]\]containing the quarter of the unit circle centered at the origin, see Fig. [1]. If points are sampled uniformly within the square, the probability that a point lies inside the quarter circle is equal to the ratio of their areas,
\[P(x^{2}+y^{2}\leq 1)=\frac{\pi/4}{1}=\frac{\pi}{4}.\](1)
Consequently, if
\[N\]random points are generated and
\[N_{\mathrm{in}}\]fall inside the quarter circle,
\[\pi\]can be estimated as
\[\hat{\pi}=4\,\frac{N_{\mathrm{in}}}{N}.\](2)
The accuracy of this estimator improves as
\[N^{-1/2}\]from Poissonian fluctuations and depends solely on the availability of uniformly distributed random numbers.
In this work we reverse the conventional approach. Instead of employing a pseudorandom number generator, we use the decimal digits of
\[\pi\]themselves as the source of random samples for the Monte Carlo algorithm. This approach does not constitute a proof of normality, nor can it establish statistical independence, which cannot hold for a deterministic sequence. Rather, it provides an empirical assessment of the extent to which the known decimal expansion of
\[\pi\]behaves as a practical source of randomness. By exploiting the complete 314-trillion-digit dataset and optimizing the mapping of decimal digits into Monte Carlo coordinates, we obtain the most accurate self-generated Monte Carlo estimate of
\[\pi\]currently achievable.
1.1 The 314-Trillion-Digit Dataset
The decimal expansion employed in this work originates from the record computation of
\[\pi\]completed by StorageReview at the end of 2025 using the y-cruncher software developed by Alexander J. Yee [[8]]. The computation reached 314 trillion decimal digits and established a new world record for the largest contiguous calculation of
\[\pi\]performed on a single server. The calculation required approximately 102 days of uninterrupted execution, demonstrating the maturity of modern high-performance storage architectures as well as the scalability of state-of-the-art multiple-precision arithmetic algorithms.
The computation was performed on a Dell PowerEdge R7725 equipped with two AMD EPYC 9965 processors, providing a total of 384 CPU cores, 1.5 TB of DDR5 memory, and a storage subsystem consisting of forty 61.44 TB NVMe SSDs for a total raw capacity of approximately 2.5 PB. Unlike previous record computations that relied on distributed storage infrastructures, the entire calculation was executed on a single machine using a carefully optimized local NVMe array capable of sustaining extremely high I/O bandwidth throughout the run. The software employed the Chudnovsky series together with the advanced multiple-precision algorithms implemented in y-cruncher, where the dominant bottleneck is no longer floating-point performance but rather memory bandwidth and disk throughput.
During the computation, intermediate checkpoints occupied more than 1.4 PiB of logical storage, while the total amount of data read and written exceeded 240 PiB. These figures illustrate that modern record computations of
\[\pi\]are essentially large-scale data-management problems, where efficient I/O scheduling and storage reliability are as important as computational performance.
Once the calculation had been verified, the final decimal expansion was made public through the Backblaze B2 cloud storage platform. The published dataset contains over 130 TB of decimal digits organized into 628 files of approximately 206 GB each, making it the largest publicly accessible collection of
\[\pi\]digits available to date. The much larger temporary checkpoint files generated during the computation were discarded after verification, while the final digit sequence was preserved for public access.
Backblaze stores the dataset using its Vault architecture, in which each file is divided into multiple data shards protected by Reed–Solomon erasure coding and distributed across independent storage pods. This design provides high durability while allowing efficient retrieval of very large files, making the complete decimal expansion readily accessible for mathematical, statistical, and computational investigations such as the one presented in this work.
2 Construction of the Monte Carlo Sample
\[r=1\] \[x\] \[y\]_Figure 2: Schematic representation of the grid optimization procedure. Consecutive blocks of decimal digits of
\[\pi\]are mapped into coordinates
\[(x,y)\]inside the unit square. The grid size
\[N_{x}\times N_{y}\]is selected to minimize the probability of multiple points falling into the same cell (pile-up). For the 314-trillion-digit dataset, the optimal choice provides a sufficiently large phase space such that the generated Monte Carlo samples remain statistically independent at the scale relevant for the estimation of
\[\pi\]. _
The decimal expansion of
\[\pi\]is converted into a sequence of two-dimensional points by partitioning the digit stream into consecutive blocks. For each point, the first
\[n_{x}\]digits are interpreted as the decimal fraction defining the
\[x\]coordinate,
\[x=0.d_{1}d_{2}\cdots d_{n_{x}},\](3)
while the following
\[n_{y}\]digits define
\[y=0.d_{n_{x}+1}\cdots d_{n_{x}+n_{y}}.\](4)
Successive points are obtained by repeating the same procedure over the remaining digits. A suitable choice of
\[n_{x}\]and
\[n_{y}\]is required to avoid an excessive occupation of the same cells in the
\[(x,y)\]plane. Let the unit square be partitioned into a grid of
\[N_{x}\times N_{y}\]cells. Requiring, on average, one Monte Carlo point per cell gives
\[N_{x}N_{y}\simeq 314\times 10^{12},\](5)
where
\[314\times 10^{12}\]is the total number of available decimal digits. Assuming a square grid as reported in Fig. [2],
\[N_{x}=N_{y}=\sqrt{314\times 10^{12}}\simeq 1.772\times 10^{7}.\](6)
Since each coordinate is encoded by a decimal integer, the required number of digits is
\[n_{x}=n_{y}=\left\lceil\log_{10}N_{x}\right\rceil=7.\](7)
Therefore each Monte Carlo point consumes
\[n_{x}+n_{y}=14\]decimal digits, yielding a total sample size
\[N=\frac{314\times 10^{12}}{14}=22.4\times 10^{12}.\](8)
The statistical uncertainty of the Monte Carlo estimator scales as
\[\sigma_{\pi}\sim\frac{1}{\sqrt{N}}\sim 10^{-7},\](9)
corresponding to an expected accuracy of approximately seven decimal digits for the estimate of
\[\pi\].
3 Parallel Processing of the Dataset
The complete decimal expansion of
\[\pi\]published through the Backblaze cloud consists of 628 independent files, each containing approximately 206 GB of decimal digits. Such an organization naturally lends itself to a parallel processing strategy, since each file can be analyzed independently without requiring communication with the remaining portions of the dataset.
The multi-threaded simulation code was developed in R with C++ extensions for the binary decoding of YCD files. It was run on an INFN Cloud server (physically hosted at CNAF) with 32 available cores. The data were accessed remotely via rclone, without creating a local copy, resulting in a total execution time of approximately 10 days. Each worker process reads one chunk of the digit sequence and partitions it into consecutive blocks of sixteen decimal digits. The first eight digits are interpreted as the fractional part of the
\[x\]coordinate,
\[x=0.d_{1}d_{2}\cdots d_{8},\](10)
while the following eight digits define
\[y=0.d_{9}d_{10}\cdots d_{16}.\](11)
Each pair therefore represents one point uniformly distributed over the unit square, assuming that the decimal expansion behaves as a pseudorandom sequence. The point is classified according to the condition
\[x^{2}+y^{2}\leq 1,\](12)
which determines whether it lies inside the quarter unit circle. Rather than storing every generated point, each worker maintains only two integer counters: the total number of processed points,
\[N_{i}\], and the number of points inside the quarter circle,
\[N_{i,\mathrm{in}}\]. At the end of the analysis of a chunk, the worker returns these two values (and additional data data) to the main thread. Since only two integers are produced for each input file, the reduction stage requires a negligible amount of memory and communication.
Each chunk corresponding to one of the 628 samples provides an independent estimate of
\[\pi\], calculated as:
\[\hat{\pi}_{i}=4\frac{N_{\mathrm{in,i}}}{N_{i}}.\](13)
We performed a one-sample Student’s
\[t\]-test to verify that the sample mean is compatible with the theoretical value of
\[\pi\], obtaining a
\[p\]-value of 0.17. This result indicates that there is no statistically significant evidence to reject the null hypothesis that the mean of the
\[\hat{\pi}_{i}\]estimates is equal to the theoretical value of
\[\pi\].
Under this hypothesis, the maximum likelihood estimate of
\[\hat{\pi}\]can be obtained by averaging the
\[\hat{\pi}_{i}\], since all
\[N_{i}\]are nearly identical (with variations at the ppm level). The standard error of
\[\hat{\pi}\], denoted by
\[\sigma_{\hat{\pi}}\], can be estimated using the central limit theorem as the standard deviation of the
\[\hat{\pi}_{i}\]divided by the square root of the number of chunks
\[\boxed{\hat{\pi}=3.14159313\pm 0.00000035}\](14)
reproducing
\[\pi\]with the expected 7-digit precision, within the estimated uncertainty.
A second approach to estimate both
\[\hat{\pi}\]and its uncertainty is to exploit the binomial nature of the process using the full statistics, with a success probability
\[p=\nicefrac4\], as discussed in Sec. 1. We have
\[\hat{\pi}_{B}=4\penalty\ \frac{\Sigma_{i}N_{\mathrm{in},i}}{\Sigma_{i}N_{i}}=4\penalty\ \frac{17,615,350,257,158}{22,428,557,114,832}=\hat{\pi}\](15)
where the last equality holds only if all
\[N_{i}\]are identical. In our data set,
\[\hat{\pi}_{B}\]and
\[\hat{\pi}\]differ by
\[10^{-13}\], which is entirely negligible. The standard error is
\[\sigma_{\hat{\pi}_{B}}=4\sqrt{\frac{p(1-p)}{\Sigma_{i}N_{i}}}=0.00000035=\sigma_{\hat{\pi}}.\](16)
The agreement between
\[\sigma_{\hat{\pi}_{B}}\]and
\[\sigma_{\hat{\pi}}\]is expected because each chunk contains a very large number of points, making the sample mean and the full binomial estimator statistically equivalent.
The excellent agreement (
\[\Delta=\pi-\hat{\pi}\approx 1.4\penalty\ \sigma_{\hat{\pi}}\]) with the theoretical expectation, demonstrating that the decimal expansion of
\[\pi\]can successfully act as its own source of pseudorandom numbers in a large-scale Monte Carlo simulation.
The statistical significance of the obtained estimate can be evaluated by comparing the measured value
\[\hat{\pi}\]with the exact value of
\[\pi\]within the expected fluctuations of the Monte Carlo method. Since we have already verified that the standard errors obtained from the central limit theorem and from the sample population are consistent, the
\[\chi^{2}\]can be expressed in terms of known quantities:
\[\chi^{2}=\left(\frac{\Delta}{\sigma_{\hat{\pi}}}\right)^{2}=1.9\,,\](17)
which follows the known distribution with one degree of freedom under the hypothesis that the digits of
\[\pi\]behave as a statistically random source for the Monte Carlo sampling. The resulting
\[p\]-value,
\[P(\chi^{2},1)={0.17},\](18)
quantifies the compatibility of the observed deviation with the statistical fluctuations expected from a Monte Carlo process. A value consistent with the expected
\[\chi^{2}\]distribution indicates that the decimal expansion of
\[\pi\], despite being deterministic, provides a statistically valid source for the generation of Monte Carlo samples at the scale investigated in this work.
Additionally, for each chunk, we filled a histogram with
\[10^{7}\]bins, each corresponding to a possible outcome of the 7-digit random numbers. We tested whether the occurrences of the numbers were unbiased. For each histogram, we evaluated the goodness of fit using the Pearson
\[\chi^{2}\]test under the hypothesis that the content of each bin was a realization of a Poisson process with mean value
\[\mu_{i}=\nicefrac}}\]. The resulting 628
\[p\]-values are uniformly distributed between 0 and 1, allowing us to exclude biases in the decoding of the binary data or bugs in the analysis code.
4 Philosophical Perspective
The present analysis raises a deeper question concerning the relationship between determinism and randomness in mathematical objects. If the complete infinite decimal expansion of
\[\pi\]were available, could
\[\pi\]itself become a source capable of generating
\[\pi\]indefinitely? In other words, could a deterministic sequence contain enough internal statistical structure to reconstruct the very object from which it originates? From a strict mathematical point of view, the answer depends on the meaning assigned to randomness. The digits of
\[\pi\]are not random in the algorithmic sense: they are uniquely determined by the definition of the constant. Consequently, they cannot generate new information beyond what is already contained in the infinite sequence itself. However, if
\[\pi\]is normal, its digits would contain every finite pattern with the correct asymptotic frequency, making the sequence statistically indistinguishable from a random source for many practical purposes.
In this hypothetical limit of infinite knowledge, a self-generating process based on the digits of
\[\pi\]would not represent a true generation of new information, but rather a form of self-extraction. The constant would act as both the encoded object and the apparent source of randomness used to recover it. This resembles the distinction between randomness and complexity in algorithmic information theory: a sequence may be completely deterministic while exhibiting maximal statistical disorder. Therefore, an infinite expansion of
\[\pi\]could, in principle, generate arbitrarily accurate Monte Carlo reconstructions of
\[\pi\]itself, provided that the sequence possesses the statistical properties expected from a normal number. The process would not violate determinism, since the output is already implicitly contained in the input. It would instead reveal a remarkable property of mathematical information: a sufficiently complex deterministic object can behave as its own random environment.
Conclusion
In this work we have investigated the statistical properties of the largest currently available decimal expansion of
\[\pi\]by adopting a complementary approach to conventional frequency-based tests of normality. Rather than analyzing the occurrence of digit patterns directly, we employed the decimal digits themselves as the source of pseudorandom numbers in a Monte Carlo estimation of
\[\pi\]. A deterministic mapping of consecutive digit blocks into two-dimensional coordinates was introduced, allowing the construction of nearly
\[2\times 10^{13}\]independent Monte Carlo samples from the complete 314-trillion-digit dataset. The resulting estimate reproduces the first seven decimal digits of
\[\pi\], in agreement with the statistical accuracy expected from the finite sample size, whose uncertainty scales as
\[N^{-1/2}\].
Although the present analysis does not constitute a proof of normality, nor can it establish statistical independence of the digits, it provides a stringent empirical validation of their random-like behavior in a practical stochastic computation. In particular, the fact that the decimal expansion of
\[\pi\]can successfully serve as its own source of pseudorandom numbers demonstrates that no detectable statistical bias emerges at the scale of the largest dataset currently available. This work provides further support for the use of optimized spigot algorithms in the development of new random number generators for Monte Carlo simulations in physics, exploiting arbitrary irrational numbers as seeds.
As computations of
\[\pi\]continue to extend to even larger numbers of digits, the same methodology can be naturally refined to produce progressively more accurate self-generated Monte Carlo estimates. Beyond its intrinsic mathematical interest, this approach offers an intuitive and quantitative connection between the concepts of normality, pseudorandomness, and stochastic simulation, providing an alternative framework for assessing the statistical properties of one of mathematics’ most celebrated constants.
Acknowledgments
The authors sincerely thank Brian Beeler (Backblaze) for his support and assistance in accessing the 314-trillion-digit
\[\pi\]dataset. The public availability of this unique computational resource made the present work possible, and we greatly appreciate his commitment to facilitating its use by the scientific community.
References
- [1]
D. H. Bailey and J. M. Borwein, Pi: The Next Generation, Springer International Publishing, Cham (2016).
- [2]
J. M. Borwein, D. H. Bailey, and R. Girgensohn, Experimentation in Mathematics: Computational Paths to Discovery, A. K. Peters, Wellesley, MA (2004).
- [3]
E. Borel, “Les probabilités dénombrables et leurs applications arithmétiques,” Rendiconti del Circolo Matematico di Palermo, 27, 247–271 (1909).
- [4]
L. Kuipers and H. Niederreiter, Uniform Distribution of Sequences, Wiley, New York (1974).
- [5]
Y. Bugeaud, Distribution Modulo One and Diophantine Approximation, Cambridge University Press, Cambridge (2012).
- [6]
D. H. Bailey and R. E. Crandall, “Random Generators and Normal Numbers,” Experimental Mathematics, 11(4), 527–546 (2002).
- [7]
D. H. Bailey, P. Borwein, and S. Plouffe, “On the Rapid Computation of Various Polylogarithmic Constants,” Mathematics of Computation, 66(218), 903–913 (1997).
- [8]
A. J. Yee, “314 Trillion Digits of
\[\pi\],” y-cruncher / NumberWorld, 2025. Available at: https://www.numberworld.org/y-cruncher/.
- [9]
Backblaze, “314 Trillion Digits of Pi Stored in the Backblaze Cloud,” Backblaze Technical Blog, 2025. Available at: https://www.backblaze.com/blog/backblaze-now-serving-314-trillion-digits-of-pi/, accessed on Aug 5, 2026.
- [10]
P. Trüb, “Digit Statistics of the First 22.4 Trillion Decimal Digits of Pi,” arXiv:1612.00489 (2016).
- [11]
N. Metropolis and S. Ulam, “The Monte Carlo Method,” Journal of the American Statistical Association, 44(247), 335–341 (1949).
- [12]
M. H. Kalos and P. A. Whitlock, Monte Carlo Methods, Second Edition, Wiley-VCH, Weinheim (2008).
- [13]
G. S. Fishman, Monte Carlo: Concepts, Algorithms, and Applications, Springer, New York (1996).
第二部分:解析(深度解读)
核心论点
2025 年末,π 的计算达到 314 万亿位小数,成为该常数有史以来最大的数值数据集。作者利用这一空前数据集,检验一个有趣假设:π 自身的数字能否作为伪随机源,用最简单的蒙特卡洛方法(随机投点估 π)来「反估 π」?结果显示,π 数字表现出高度统计随机性,证据超越了「正态性(normality)」假设的范畴。
关键概念
- 蒙特卡洛(投点法):用随机采样估算 π(落在圆内的比例)。
- 正态性(normality):常数各位数字在极限下均匀分布的性质(π 是否被证明正态仍开放)。
- 伪随机数 / 314 万亿位数据集:用常数数字本身当随机源做经验检验。
技术趋势与判断
- 用「史上最大常数数据集」做经验随机性检验,方法论(以常数数字作 PRNG)有教学与科普价值;本质是趣味性研究而非新估算算法。
与本站其他文章的连接
- 偏数学/计算科普,与本站 AI/半导体主线较远,归入数学基础。
风险提示
- 属经验证据而非证明;「用 π 估 π」存在循环依赖,应理解为对 π 数字随机性的检验,而非更优的 π 估算法。