Skip to content
m·amathatlas
ExploreAboutOpen problemsCited authorsMy libraryFeedback
Sign in
FRENES
Loading views…Recent views only, across all languages. Vercel history is unavailable for this page. Repeat visits in the same tab are grouped for 30 minutes.
ShareLinkedInXFacebookWhatsApp
← All open problems
Unanswered question

Checking Mertens and the like in less than linear time or less than x\sqrt{x}x​ space

Number theoryTheoretical computer science

Imported on November 28, 2026

The forum classified this question as unanswered when collected. This does not certify an open research problem; check the answers and revision history at the source.

Read the question with its definitions and background below. The source provides the full formulation and further discussion; the glossary and Wikipedia links offer additional reading aids.

Problem statement

Say you want to check that ∣∑n≤xμ(n)∣≤x|\sum_{n\leq x} \mu(n)|\leq \sqrt{x}∣∑n≤x​μ(n)∣≤x​ for all x≤Xx\leq Xx≤X. (I am actually interested in checking that ∑n≤xμ(n)/n∣≤c/x\sum_{n\leq x} \mu(n)/n|\leq c/\sqrt{x}∑n≤x​μ(n)/n∣≤c/x​, where ccc is a constant, and in finding the best ccc such that this is true in a given range, such as 3≤x≤X3\leq x\leq X3≤x≤X, say; all of these problems are evidently related.)

The natural algorithm (the same you can find in section 4 of [1], say) has running time O(Xlog⁡log⁡X)O(X \log \log X)O(XloglogX) and takes space O(X)O(\sqrt{X})O(X​) (where we think of integers as taking constant space). I've coded it with some optimizations (for ∑n≤xμ(n)/n\sum_{n\leq x} \mu(n)/n∑n≤x​μ(n)/n, using interval arithmetic) and should have a result for x=1014x=10^{14}x=1014 in about a fortnight; x=1012x=10^{12}x=1012 takes an afternoon. (When I first coded this, less carefully and on worse hardware, it took a week.)

Is it possible to do things in either less time or less space? Space is important here in practice - ideally you would want to keep everything in cache, and it is rare to have more than 4MB per processor core - that is, enough for 1.6⋅1071.6\cdot 10^71.6⋅107 values of μ\muμ, or 5⋅1055\cdot 10^55⋅105 large integers.

Notice that I am asking for a check for all x≤Xx\leq Xx≤X, and not just for a single x=Xx=Xx=X.

Further remarks: I am aware that there are algorithms for computing a single value of ∑n≤xμ(n)\sum_{n\leq x} \mu(n)∑n≤x​μ(n) in time O(x2/3log⁡log⁡x)O(x^{2/3} \log \log x)O(x2/3loglogx) [2], or even (in what looks like a more sophisticated but less practical way that may have never been coded) in time O(x1/2+ϵ)O(x^{1/2+\epsilon})O(x1/2+ϵ) ([3]; see also Mertens' function in time O(x)O(\sqrt x)O(x​)). Once can of course use such an algorithm to compute the sum for values of xxx that are about cxc\sqrt{x}cx​ apart, and then use what I've called the "natural" algorithm to deal with intervals in which such a computation shows that the statement to be verified could be violated. This results in a running time of O(x7/6log⁡log⁡x)O(x^{7/6} \log \log x)O(x7/6loglogx), or O(x1+ϵ)O(x^{1+\epsilon})O(x1+ϵ), and while memory usage could be decreased by applying the "natural" algorithm on intervals of length smaller than x\sqrt{x}x​, this would result in a longer running time.

The same is true, of course, of the "natural" algorithm itself: one could store a list of primes p≤xp\leq \sqrt{x}p≤x​ in the main memory in x\sqrt{x}x​ bits, and compute μ(m)\mu(m)μ(m) in blocks of size MMM at a time; this would require working in memory O(M)O(M)O(M) (to be stored in the cache) for the most part, but the running time would be O(x3/2/M)O(x^{3/2}/M)O(x3/2/M). Or is there a way around this? Can one, say, select the primes p≤xp\leq \sqrt{x}p≤x​ that might divide integers in an interval of length M⋘xM \lll \sqrt{x}M⋘x​, and do so in time less than x\sqrt{x}x​ or x/log⁡x\sqrt{x}/\log xx​/logx? Or is there any other way to take space substantially less than O(x)O(\sqrt{x})O(x​) while still having essentially linear running time? Or a way to have better than linear running time?

PS. I could also ask about parallelising this, but I would not like to risk making the discussion too hardware-specific here.

[1] François Dress, MR 1259423 Fonction sommatoire de la fonction de Möbius. I. Majorations expérimentales, Experiment. Math. 2 (1993), no. 2, 89--98.

[2] Marc Deléglise and Joël Rivat, MR 1437219 Computing the summation of the Möbius function, Experiment. Math. 5 (1996), no. 4, 291--295.

[3] J. C. Lagarias, and A. M. Odlyzko, MR 0890871 Computing π(x)\pi(x)π(x): an analytic method, J. Algorithms 8 (1987), no. 2, 173--191.

Statement and context adapted from MathOverflow · H A Helfgott

CC BY-SA 3.0 · Formatting adapted; mathematical formulas preserved · Source history

A few useful definitions

Prime number
An integer greater than 1 whose only positive divisors are 1 and itself. Examples include 2, 3, 5 and 7.

Topics : nt.number-theory · analytic-number-theory · computational-complexity · computation

Authors listed by the source : H A Helfgott

Sources and original status

  • MathOverflow Status in source : unanswered at collection

Last activity on the question : April 28, 2016

Coverage, sources and method

This count measures imported entries, including distinct variants. It is not a count of all open mathematical questions worldwide. One entry may belong to several fields and sources.

This directory is neither exhaustive nor updated in real time. “Reported open” describes the source classification observed at import; imported entries have not each undergone independent mathematical verification. The 32 explained entries were reviewed separately.

Formal Conjectures: only “research open” statements with no reported formal proof are retained; their tag is checked in a pinned repository revision. Variants remain distinct. A “sorry” placeholder is not sufficient to establish open status.

Erdős: solved or independent problems and entries with a Lean solution are excluded, including “open (Lean)”. Exact matches to the main Formal Conjectures statements are merged.

Open Problem Garden: the open index is checked against the solved index; spam, identified clones and some outdated statuses are excluded. Statements and definition context are attributed to their original pages; formulas are preserved and the content remains under the GFDL. Recognized duplicates across sources are merged; this does not resolve every mathematical equivalence.

OEIS: direct extraction of conjectural comments and formulas, one entry per sequence, excluding mentioned resolutions. MathOverflow and Math Stack Exchange: questions classified as unanswered by their API, excluding closed posts and non-research categories. They remain distinct from problems reported open. This is a partial, dated collection; every entry credits its authors and license.

Documented exclusions account for recent announcements and conflicting statuses. A stronger variant or a special case can remain open after a different statement is settled.

Attribution: The Formal Conjectures Authors; teorth/erdosproblems and contributors; Open Problem Garden and contributors. Each source retains its license.

  • Formal Conjectures · 1,924 · Apache-2.0 / CC-BY-4.0
  • Erdős Problems (teorth) · 622 · Apache-2.0
  • Open Problem Garden · 404 · GFDL (source content); only title/category/link metadata imported
  • OEIS · 18,857 · CC BY-SA 4.0
  • MathOverflow · 19,035 · CC BY-SA (version on each entry)
  • Mathematics Stack Exchange · 35 · CC BY-SA (version on each entry)
Report a development or correction
mathatlas

An independent atlas to understand, read, and question research.

The papers present claimed results at different stages of verification.
NewsletterShare feedbackAbout Data and privacy
Created by Sonny Mupfuni