Let for integers $n\geq 1$ the Möbius function $\mu(n)$, and $\lambda(n)$ the Liouville function (see the definition in this Wikipedia). We consider also the corresponding summary functions $$M(n)=\sum_{k=1}^n\mu(k)$$ the so-called Mertens function, and $$L(n)=\sum_{k=1}^n\lambda(k).$$

These functions are relevant in number theory because appear in theorems, methods (see the role of the Möbius function in sieve theory) or the statements of unsolved problems.

In [1] (there is open access in the site of the journal to this very nice reference) the authors tell us in the first paragraph of section 3, see the Theorem 3, a more efficient formula than the definition of Mertens function itself.

Question. Do you know more efficients ways to calculate $$L(n):=\sum_{k=1}^n\lambda(k)$$ than this definition itself? If you prefer refer it from the literature. If the identity is well known, please explain me why yours is more efficient than previous definition of $L(n)$. Thanks in advance.


[1] Manuel Benito, Juan L. Varona, Recursive formulas related to the summation of the Möbius function, The Open Mathematics Journal , Vol. 1 (2008).

  • 1
    $\begingroup$ I think calculating $L(n)$ according to the definition means factoring each number and counting its prime factors. A simple improvement is to use the fact that $\lambda$ is completely multiplicative, first finding all the primes in the range, then considering their products. But there must be a much better way. $\endgroup$ – Dan Brumleve May 9 '17 at 16:37
  • $\begingroup$ Many thanks for your attention and contribution @DanBrumleve $\endgroup$ – user243301 May 9 '17 at 16:39
  • 1
    $\begingroup$ ams.org/journals/mcom/2008-77-263/S0025-5718-08-02036-X/… I hope this paper answers your question, at least it says how such computations are being done. $\endgroup$ – ikbuzsak May 15 '17 at 3:01
  • $\begingroup$ Many thanks for your contribution @ikbuzsak $\endgroup$ – user243301 May 15 '17 at 8:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy