# About a more efficient way of evaluating $L(n):=\sum_{k=1}^n\lambda(k)$, where $\lambda(n)$ is the Liouville function, than this definition of $L(n)$

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  (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.

## References:

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

• 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. – Dan Brumleve May 9 '17 at 16:37
• Many thanks for your attention and contribution @DanBrumleve – user243301 May 9 '17 at 16:39
• 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. – ikbuzsak May 15 '17 at 3:01
• Many thanks for your contribution @ikbuzsak – user243301 May 15 '17 at 8:13