Sum of Liouville’s function

elementary-number-theorynumber theory

Let $\Omega(n)$ be the number of prime factors of $n$ (with multiplicity)

compute:
$$\sum_{n=1}^{2019} (-1)^{\Omega(n)} \left\lfloor \frac{2019}{n} \right\rfloor.$$

My thoughts:

there are obviously a couple cool properties with this function http://oeis.org/wiki/Liouville%27s_function_lambda(n)

if let $\lambda(n) = (-1)^{\Omega(n)}$

then we have

$$\lambda(mn) = \lambda(m) \cdot \lambda(n)$$

and if we sum over the divisors of $n$

$$\sum_{d|n} \lambda(d) = \begin{cases}
1 & \mbox{if } n \mbox{ is a square,}\; \\
0 & \mbox{otherwise.}\;\end{cases} $$

But I am not sure how do I finish the last step of summing up to 2019…

Best Answer

$\sum_{n \le x} \lambda(n)\lfloor \frac{x}{n}\rfloor = \sum_{n \le x} \lambda(n)\sum_{m \le x/n} 1 = \sum_{n \le x} \lambda(n)\sum_{nm \le x} 1 = \sum_{n \le x} \lambda(n)\sum_{n | d \le x} 1 = \sum_{d \le x} \sum_{n | d} \lambda(n) = \sum_{d \le x} 1_{d \text{ square}} = \lfloor \sqrt{x} \rfloor$.

Related Question