I feel that this is a very stupid question to be asking, but I can't figure it out. I've been trying to figure out the Möbius inversion formula, with pretty much no experience in this direction at all, and ran into the following problem:
So according to the Möbius inversion formula, $$g(n)=\sum_{d|n}f(d) \Longleftrightarrow f(n)=\sum_{d|n}g\left(\frac nd\right)\mu(d)$$. Yes? Since this is an equivalence, it should work both ways. Let's say $g(n)=1$, in that case, plug it into the right-hand formula and find that $f(n)=0$, or at least Wikipedia tells me that $\sum_{d|n}\mu(d)=0$. Problem: when we look at the formula on the left, we see that $g(n)$ is now equal to the sum of a finite number of zeros, even though we defined it as $1$. What stupid mistake am I making here?
The point is that
$$\sum_{d\mid n} \mu(d) = \begin{cases} 1 &, n = 1\\ 0 &, n > 1. \end{cases}$$
Thus, for $g \equiv 1$ you have
$$f(n) = \sum_{d\mid n} g\left(\frac{n}{d}\right)\mu(d) = \sum_{d\mid n} \mu(d) = \begin{cases} 1 &, n = 1\\ 0 &, n > 1 \end{cases}$$
and hence
$$g(n) = \sum_{d\mid n} f(d) = f(1) + \sum_{\substack{d\mid n\\ d > 1}} f(d) = f(1) + \sum_{\substack{d\mid n\\ d > 1}} 0 = f(1) = 1,$$
as it should be.