REVIEW 1 major objections 4 minor 28 references
Algorithms for the Multiplication Table Problem
T0 review · 1 major / 4 minor · reviewed 2026-08-14 · deepseek-v4-flash
Pith's one-line read The paper presents an algorithm that tabulates $M(n)$, the number of distinct entries in the $n\times n$ multiplication table, for all $k\le n$ in time $O(n^2/L^{1/\sqrt{2}+o(1)})$, where $L=\exp(\sqrt{\log n\,\log\log n})$, the first…
desk verdict The incremental algorithm and data are solid, but the proof of the claimed subquadratic tabulation bound (Theorem 2.9) has a real gap and needs repair. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The central object is the divisor-pair shape of an integer $k$: $\delta(k)$ is computed by marking products in rectangles $[0,g]\times[0,k/g]$ for each divisor $g\le\sqrt{k}$, so the running time of the basic step is the area of the union of these rectangles. The key mechanism is Algorithm 4, which reuses the bit vector produced for $\delta(mp)$ to compute $\delta(mq)$ for primes $p<q$ with $m<p$, adding only the products in the shifted part of the shape; the added work is $O(m(q-p)\log n)$. Around this mechanism, the paper wraps a split of integers into $L^\gamma$-smooth and non-smooth classes: smooth $k$ are handled by the direct shape algorithm, and non-smooth $k=mq$ are recovered from a single computation of $\delta(mQ)$ for the largest prime $Q$ with $mQ\le n$. The parameter $\gamma$ is chosen to equalize the two costs, giving the exponent $1/\sqrt{2}$ in the final bound.
What would settle it
Take $\gamma=1/\sqrt{2}$ and count the integers $k\le n$ whose largest prime factor $q$ satisfies $q\le k/q$, restricting to those not $L^\gamma$-smooth; if this count multiplied by $n\log n$ is not $o(n^2/L^{1/\sqrt{2}+o(1)})$, the decomposition used in the proof of Theorem 2.9 cannot yield the stated time bound.
Extended reading notes
Core claim
Let $M(k)$ be the number of distinct entries in the $k\times k$ multiplication table and let $\delta(k)=M(k)-M(k-1)$ be the number of new products created when the table grows from $k-1$ to $k$. The paper's discovery is that $\delta(k)$ can be computed by looking only at products $ij$ with $i<g$ and $j<k/g$ for divisors $g$ of $k$, and that these computations can be batched: for integers of the form $mp$ with $m<p$ a prime, the bit vector built for $\delta(mp)$ can be reused to compute $\delta(mq)$ for a later prime $q>p$, with work proportional to the gap $q-p$. Splitting all $k\le n$ into $L^\gamma$-smooth and non-smooth classes, and balancing the two sides at $\gamma=1/\sqrt{2}$, yields a tabulation of all $M(k)$ in time $O(n^2/L^{1/\sqrt{2}+o(1)})$ and space $O(n)$. This is the first subquadratic bound for the tabulation problem, and it is achieved with a direct, sieving-style method rather than a reduction to another problem.
Load-bearing premise
For the subquadratic bound, the proof needs every non-smooth $k\le n$ to split as $k=mq$ with $q$ its largest prime factor and $m<q$, so that the reuse step of Algorithm 4 applies; the paper does not address integers such as $p^3$ where $q\le m$, so the bound is not established for that class.
Editorial extensions
If this is right
- The tabulation problem for $M(n)$ is asymptotically separated from the direct quadratic construction: Theorem 2.9 supplies an algorithm whose running time is $o(n^2)$, so the limiting obstruction to exact computation is no longer the area of the table.
- The incremental Algorithm 3 runs in time $O(n^2\log n/\Phi(n))$, where $\Phi(n)$ is the slowly varying factor from the known order-of-magnitude result, and Remark 2.7 observes this can be written as $O(M(n)\log n)$, tying the cost to the number of distinct products rather than to the table area.
- Working modulo $w$ (with $w$ up to 120 in the implementation) reduces both time and space for a $\delta(n)$ computation by counting consecutive products instead of constructing them; the reported runtime for computing a batch of $\delta(n)$ values near $n=10^8$ drops as $w$ increases from 1 to 60.
- Lemma 3.2 shows that, for the same number of trials, the product estimator's variance is no larger than that of the Bernoulli estimator; in the implementation the product method is preferred for smaller $n$ and the Bernoulli method for larger $n$, mainly because of space.
- The numerical data, exact through $n=2^{30}$ and Monte Carlo through $n=2^{100,000,000}$, show the normalized ratio $N^2/(M(N)\Phi(N))$ trending toward roughly 0.12; extrapolating this to a limit is non-rigorous, and the paper notes the true asymptotic region may only begin at far larger $n$.
- We infer that the bit-vector reuse in Algorithm 4 should transfer to other counting problems defined by divisor-list shapes, such as distinct products in rectangular or asymmetric tables, where the same \u201clearn $\delta(mp)$ while computing $\delta(mq)$\u201d mechanism applies whenever two integers have similar divisor structures.
- We infer that, in practice, the split parameter $\gamma$ would be tuned rather than fixed at $1/\sqrt{2}$, and that measuring the crossover between Algorithm 3 and Algorithm 5 would give a concrete test of where the subquadratic bound starts to bite.
- The exceptional case identified above suggests a concrete check: count non-smooth $k$ with $q\le k/q$ and see whether a shifted $\gamma$ absorbs them into the smooth class; if it does not, a modified treatment would be needed to keep the theorem intact.
Signed reviews
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The manuscript studies the computation of M(n), the number of distinct entries in the n × n multiplication table. It presents exact algorithms, including a direct quadratic algorithm, an incremental algorithm that tabulates M(k) for k ≤ n in O(n^2 log n / Φ(n)) time with O(n) space, and a claimed subquadratic algorithm with running time O(n^2/L^{1/√2+o(1)}) and O(n) space. It also gives two Monte Carlo estimators and proves that the 'product' estimator has variance no larger than the 'Bernoulli' estimator. Numerical results are reported for exact computations up to n = 2^30 and Monte Carlo estimates up to n = 2^{100,000,000}, and the data are compared with Ford's order-of-magnitude result.
Significance. If the subquadratic bound were established, it would be a notable improvement over the previous O(n^2 log n / Φ(n)) incremental method, making the exact tabulation claim of clear interest. The incremental algorithm and its Ford-based time bound (Theorem 2.6) are sound and useful, the variance comparison in Lemma 3.2 is correct, and the computational results are extensive. The paper also appears to be the first to implement Bach's algorithm for generating random factored integers. The main caveat is the gap in the proof of Theorem 2.9, which is discussed below and prevents the central subquadratic claim from being accepted as proven.
major comments (1)
- [§2.5, Theorem 2.9] The proof of Theorem 2.9 does not cover non-L^γ-smooth k whose largest prime factor q satisfies q ≤ m, where k = m q. The proof writes such k as m q and claims that computing δ(mQ) for the largest prime Q with mQ ≤ n via Algorithm 4 learns δ(mq) for all primes q ≤ Q. However, Algorithm 4 and Lemma 2.8 require an initial prime p with m < p < q; when q ≤ m (e.g., k = p^3 with p > L^γ) no such p exists, and when m > sqrt(n) the largest prime Q with mQ ≤ n may itself satisfy Q ≤ m. The proof gives no alternative treatment or run-time estimate for these k, so the claimed O(n^2/L^{1/√2+o(1)}) total bound is not established for all k ≤ n.
minor comments (4)
- [§2.3, Lemma 2.8] The proof of Lemma 2.8 is a single sentence; please expand the area calculation to justify the O(m log n) bound per unit shift, since this estimate is used in the proof of Theorem 2.9.
- [§4, Table 3] The header of Table 3 is garbled: the last column should be labeled (N^2/M(N))/Φ(N), and the units of the 'trials' column should be stated. In particular, the value 100 for n = 30 appears inconsistent with the T = 10^6 mentioned earlier in §4.
- [§2.5, Algorithm 5] Algorithm 5 is defined only by the proof of Theorem 2.9; a pseudocode listing or a more explicit algorithmic description would improve reproducibility and reader confidence.
- [Global] There are minor typographical issues in the arXiv source, including spurious spaces in the title in the header; please check the source file before final submission.
Circularity Check
No significant circularity: the new algorithm's time bounds are derived from external standard results and an analytically balanced parameter, not from fitted data or self-referential definitions.
full rationale
The paper's central claim, Theorem 2.9, is derived by splitting k ≤ n into L^γ-smooth numbers and non-smooth numbers k = mq with q the largest prime factor. The count of smooth numbers uses the external Canfield–Erdős–Pomerance bound, and the δ(n) analysis uses Ford's Corollary 5 through Lemma 2.4. The parameter γ is chosen analytically as γ = 1/√2 to balance two runtime terms; no parameter is fitted to data and then renamed as a prediction. The Monte Carlo extrapolation near 0.12 is explicitly labelled non-rigorous in the paper, so it is not presented as a derivation from the algorithm's own outputs. The authors' self-citations, such as Brent–Kung [8] and Brent's slides [6,7], are historical or implementation-related and are not load-bearing for the asymptotic tabulation claim. The reviewer's concern about non-smooth k = mq with q ≤ m, such as k = p^3, is a potential correctness gap in the proof of Theorem 2.9, not a circularity: it does not reduce the claimed runtime to an input by construction. Applying the required quote-and-reduction standard, no circular step can be exhibited.
Assumptions & free parameters
assumptions (4)
- standard math Ford's theorem: M(n) = Theta(n^2 / Phi(n)) with Phi(n) = (log n)^c (log log n)^{3/2}
- standard math Lemma 2.4 (Ford, Corollary 5): (1/n) sum_{k <= n} tau^+(k) = Theta(log n / Phi(n))
- standard math Smooth number count: the number of L^gamma-smooth integers <= n is n / L^{1/(2gamma)+o(1)}
- standard math Bach's algorithm generates random integers in [1,N] together with their prime factorization in expected time (log N)^{O(1)}
Cite this review
Pith. "Pith review of Algorithms for the Multiplication Table Problem." pith.science (2026). https://pith.science/paper/DLOPHZKP
@misc{pith2026190804251,
author = {Pith},
title = {Pith review of: Algorithms for the Multiplication Table Problem},
year = {2026},
howpublished = {\url{https://pith.science/paper/DLOPHZKP}},
note = {Machine review of arXiv:1908.04251}
}
abstract
Let $M(n)$ denote the number of distinct entries in the $n \times n$ multiplication table. The function $M(n)$ has been studied by Erd\H{o}s, Tenenbaum, Ford, and others, but the asymptotic behaviour of $M(n)$ as $n \to \infty$ is not known precisely. Thus, there is some interest in algorithms for computing $M(n)$ either exactly or approximately. We compare several algorithms for computing $M(n)$ exactly, and give a new algorithm that has a subquadratic running time. We also present two Monte Carlo algorithms for approximate computation of $M(n)$. We give the results of exact computations for values of $n$ up to $2^{30}$, and of Monte Carlo computations for $n$ up to $2^{100,000,000}$, and compare our experimental results with Ford's order-of-magnitude result.
Figures
Figures from the paper (1 more)
Reference graph
Works this paper leans on
-
[1]
Manindra Agrawal, Neeraj Kayal, and Nitin Saxena, PRIMES is in P , Ann. of Math. (2) 160 (2004), 781–793. 12Table 3 is extended to n = 5 × 108 (but with lower accuracy) in [6, 7]. ALGORITHMS FOR THE MULTIPLICATION TABLE PROBLEM 15
work page 2004
-
[2]
Eric Bach, How to generate factored random numbers , SIAM J. Comput. 17 (1988), 179–193
work page 1988
-
[3]
M. Balazard, J. L. Nicolas, C. Pomerance, and G. Tenenbau m, Grandes d´ eviations pour certaines fonctions arithm´ etiques, J. Number Theory 40 (1992), 146–164 (in French)
work page 1992
-
[4]
Bernstein, Detecting perfect powers in essentially linear time , Math
Daniel J. Bernstein, Detecting perfect powers in essentially linear time , Math. Comp. 67 (1998), 1253–1283
work page 1998
-
[5]
Wieb Bosma, John Cannon, and Catherine Playoust, The Magma algebra system. I. The user language , J. Symbolic Comput. 24 (1997), 235–265
work page 1997
-
[6]
Richard P. Brent, The multiplication table, and random factored integers , slides from a semi- nar given at Hong Kong Baptist University, Hong Kong, Feb. 6, 2015. https://maths-people. anu.edu.au/~brent/pd/multiplication-HK.pdf
work page 2015
-
[7]
Richard P. Brent, Algorithms for the multiplication table , slides from a seminar given at CARMA, Newcastle, NSW, May 29, 2018. https://maths-people.anu.edu.au/~brent/pd/ multiplication-CARMA.pdf
work page 2018
-
[8]
Richard P. Brent and H. T. Kung, The area-time complexity of binary multiplication , J. Assoc. Comput. Mach. 28 (1981), 521–534. Corrigendum: ibid 29 (1982), 904
work page 1981
Show all 28 references
-
[9]
Burthe, Jr., Further investigations with the strong probable prime test , Math
Ronald J. Burthe, Jr., Further investigations with the strong probable prime test , Math. Comp. 65 (1996), 373–381
1996
-
[10]
E. R. Canfield, P. Erd˝ os, and C. Pomerance, On a problem of Oppenheim concerning ‘Fac- torisatio Numerorum’, J. Number Theory 17 (1983), 1–28
1983
-
[11]
Richard Crandall and Carl Pomerance, Prime Numbers: A Computational Perspective , sec- ond edition, Springer, New York 2005
2005
-
[12]
Paul Erd˝ os, Some remarks on number theory , Riveon Lematematika 9 (1955), 45–48 (in Hebrew)
1955
-
[13]
Paul Erd˝ os,An asymptotic inequality in the theory of numbers , Vestnik Leningrad. Univ. 15 (1960), no. 13, 41–49 (in Russian)
1960
-
[14]
Tenenbaum, Sur la structure de la suite des diviseurs d’un entier , Ann
Paul Erd˝ os and G. Tenenbaum, Sur la structure de la suite des diviseurs d’un entier , Ann. Inst. Fourier (Grenoble) 31 (1981, no. 1, ix, 17–37 (in French)
1981
-
[15]
Kevin Ford, The distribution of integers with a divisor in a given interv al, Ann. of Math. (2) 168 (2008), no. 2, 367–433
2008
-
[16]
Lecture Notes, vol
Kevin Ford, Integers with a divisor in (y,2y], Anatomy of integers, CRM Proc. Lecture Notes, vol. 46, Amer. Math. Soc., Providence, RI, 2008, pp. 65–80
2008
-
[17]
C. F. Gauss, Theoria combinationis observationum erro ribus minimis obnoxiae, Carl Friedrich Gauss Werke , Bd. 4, G¨ ottingen, 1873, 1–26 (in Latin)
-
[18]
Helfgott, An improved sieve of Eratosthenes , Math
Harald A. Helfgott, An improved sieve of Eratosthenes , Math. Comp. 89 (2020), 333-350
2020
-
[19]
Hennessy and David A
John L. Hennessy and David A. Patterson, Computer Architecture: a Quantative Approach , fifth edition, Elsevier, 2012
2012
-
[20]
Cryptology 16 (2003), 287–289
Adam Kalai, Generating random factored numbers, easily , J. Cryptology 16 (2003), 287–289
2003
-
[21]
Khinchin, ¨Uber einen Satz der Wahrscheinlichkeitsrechnung , Fundamenta Mathematicae 6 (1924), 9–20 (in German)
Aleksandr Y. Khinchin, ¨Uber einen Satz der Wahrscheinlichkeitsrechnung , Fundamenta Mathematicae 6 (1924), 9–20 (in German)
1924
-
[22]
H. W. Lenstra jr. and Carl Pomerance, Primality testing with Gaussian periods , J. European Math. Soc. 21 (2019), 1229–1269
2019
-
[23]
Lichtman and Carl Pomerance, Improved error bounds for the Fermat primality test on random inputs , Math
Jared D. Lichtman and Carl Pomerance, Improved error bounds for the Fermat primality test on random inputs , Math. Comp. 87 (2018), 2871–2890
2018
-
[24]
Miller, Riemann ’s hypothesis and tests for primality, J
Gary L. Miller, Riemann ’s hypothesis and tests for primality, J. Comp. System Sci. 13 (1976), 300–317
1976
-
[25]
Norton On the number of restricted prime factors of an integer, I , Illinois J
Karl K. Norton On the number of restricted prime factors of an integer, I , Illinois J. Math. 20 (1976), 681–705
1976
-
[26]
David Purdum, Multiplication table , https://rutrum.github.io/multiplication-table/
-
[27]
David Purdum and Jonathan W ebster, http://blue.butler.edu/~jewebste/Mn2pow30.txt
-
[28]
Rabin, Probabilistic algorithm for testing primality , J
Michael O. Rabin, Probabilistic algorithm for testing primality , J. Number Theory 12 (1980), 128–138
1980
Reviewed August 14, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.