TITLE: Prove $\sum_{d \leq x} \mu(d)\left\lfloor \frac xd \right\rfloor = 1 $
QUESTION [10 upvotes]: 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.

REPLY [5 votes]: 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)
$$