English

An Algorithm for Ennola's Second Theorem and Counting Smooth Numbers in Practice

Number Theory 2022-08-04 v1 Data Structures and Algorithms

Abstract

Let Ψ(x,y)\Psi(x,y) count the number of positive integers nxn\le x such that every prime divisor of nn is at most yy. Given inputs xx and yy, what is the best way to estimate Ψ(x,y)\Psi(x,y)? We address this problem in three ways: with a new algorithm to estimate Ψ(x,y)\Psi(x,y), with a performance improvement to an established algorithm, and with empirically based advice on how to choose an algorithm to estimate Ψ\Psi for the given inputs. Our new algorithm to estimate Ψ(x,y)\Psi(x,y) is based on Ennola's second theorem [Ennola69], which applies when y<(logx)3/4ϵy< (\log x)^{3/4-\epsilon} for ϵ>0\epsilon>0. It takes O(y2/logy)O(y^2/\log y) arithmetic operations of precomputation and O(ylogy)O(y\log y) operations per evaluation of Ψ\Psi. We show how to speed up Algorithm HT, which is based on the saddle-point method of Hildebrand and Tenenbaum [1986], by a factor proportional to loglogx\log\log x, by applying Newton's method in a new way. And finally we give our empirical advice based on five algorithms to compute estimates for Ψ(x,y)\Psi(x,y).The challenge here is that the boundaries of the ranges of applicability, as given in theorems, often include unknown constants or small values of ϵ>0\epsilon>0, for example, that cannot be programmed directly.

Cite

@article{arxiv.2208.01725,
  title  = {An Algorithm for Ennola's Second Theorem and Counting Smooth Numbers in Practice},
  author = {Chloe Makdad and Jonathan P. Sorenson},
  journal= {arXiv preprint arXiv:2208.01725},
  year   = {2022}
}
R2 v1 2026-06-25T01:25:44.097Z