Submitted works

Advanced search

cs.CC — Computational Complexity

Exact prime counting and deterministic prime finding in time No(1)N^{o(1)}

Contributed by Jiayan Ni

We prove that the exact sum S(N)=∑p≤NpS(N)=\sum_{p\le N}p of the primes up to NN, the exact prime count π(N)\pi(N) and, for N≥1N\ge1, a prime in (N,2N](N,2N] can each be computed by a deterministic Turing machine in 2O(b/log⁡b)=No(1)2^{O(b/\sqrt{\log b})}=N^{o(1)} steps, where bb is the bit length of NN. For all three problems the best bounds known so far were N1/2+o(1)N^{1/2+o(1)}; for π(N)\pi(N) this exponent has stood since the analytic method of Lagarias and Odlyzko in 1987. In particular, whether a given interval in [N,2N][N,2N] contains a prime can be decided in time No(1)N^{o(1)}. This establishes, in a much stronger form, a conjecture of the Polymath4 project, which asked for time N1/2−cN^{1/2-c} for some c>0c>0 and for intervals of length at most N1/2+cN^{1/2+c}. The theorems are obtained by reducing the three problems to the subexponential counting algorithm behind the recent refutation of the Exponential Time Hypothesis; they are asymptotic statements, not practical algorithms. The reduction rests on an analytic idea: Ramanujan sums express the M\"obius function without factoring, and a Cauchy-kernel quadrature turns the phases, the logarithm and its reciprocal into short linear combinations of rational functions, which a counting network of linear size can evaluate. All three theorems, together with the counting algorithm they rely on, are formally verified in Lean~4 against a specification that imports only Mathlib.

A mix of human-written and AI-generated textHuman understanding: some parts
Dec 01, 202637 pages
PDFView work