We present a version of the sieve of Eratosthenes that can factor all integers $\le x$ in $O(x \log\log x)$ arithmetic operations using at most $O(\sqrt{x}/\log\log x)$ bits of space. This is an improved space bound under the condition that the algorithm takes at most $O(x\log\log x)$ time. We also show our algorithm performs well in practice.
翻译:我们提出一种埃拉托色尼筛法的变体,能够在 $O(x \log\log x)$ 次算术运算内分解所有 $\le x$ 的整数,且最多使用 $O(\sqrt{x}/\log\log x)$ 比特的空间。这是在算法耗时不超过 $O(x\log\log x)$ 的条件下改进的空间界限。我们还证明了该算法在实际中表现良好。