Prove $\sum_{d \leq x} \mu(d)\left\lfloor \frac xd \right\rfloor = 1 $

I am trying to show $$\sum_{d \leq x} \mu(d)\left\lfloor \frac{x}{d} \right\rfloor = 1 \;\;\;\; \forall \; x \in \mathbb{R}, \; x \geq 1 $$ I know that the sum over the divisors $d$ of $n$ is zero if $n \neq 1$. So we can rule out integers that are divisors of $x$ (if $x > 1$). I am not sure if I am on the right track to prove this. Any hints would be helpful. This is homework.


Solution 1:

This is typical example in Möbius Inversion.

Use $\sum\limits_{d|n}\mu(d)=\epsilon(n)$ where $\epsilon(n)=1$ if $n=1$, and 0 otherwise. Now, $$\sum_{n\leq x}\sum_{d|n}\mu(d)=\sum_{n\leq x}\epsilon(n)=1$$ Changing the order of summation, we get $$\sum_{d\leq x}\mu(d)\sum_{d|n, n\leq x}=1$$ Then the inside summation is $\left\lfloor\frac{x}{d}\right\rfloor$. So, we are done.

Solution 2:

It appears indeed to be an instance of the Moebius inversion formula, applied to $f(x) = \lfloor x \rfloor$ and $g(x) = 1$. We have $$ f(x)=\sum_{d \in \mathbf{Z}, 1 \le d \le x} g(x/d). $$ Then $$ g(x) = \sum_{d \in \mathbf{Z}, 1 \le d \le x} \mu(d) f(x/d) $$