I want to prove that for every $n \in \mathbb{N}$ : $$$$ $f(n)=\sum_{d|n} g(d) \quad$ $ \Leftrightarrow$ $\quad g(n)=\sum_{d|n} \mu(d)f(n/d)$ $$$$ I proved the first direction and for the second one I tried the following:$$$$IC Let $$ g(n)=\sum_{d|n}\mu(d)f(n/d) $$ $$ g(n)=\sum_{d|n}\mu(n/d)f(d) $$ Now applying the first direction yields
$$\mu(n/n)f(n)=\sum_{d|n}\mu(d)g(n/d) $$
$$\mu(1)f(n)=\sum_{d|n}\mu(n/d)g(d) $$
$$f(n)=\sum_{d|n}\mu(n/d)g(d) $$ Now letting $n=2$ then $f(2) = g(2)-g(1)$ not $f(2) = g(2)+g(1)$. $$$$ Where did I go wrong? Thanks in advance.