Background
I came up with an unorthodox proof of the following:
$$\sum_{d|n} \mu(\frac{n}{d}) P(d) = 1$$
Where $n \neq 1$, $P(d)$ is a function which counts the number of primes of $d$ and $\mu$ is the mobius function. I was wondering if there was a simple proof.
For example $n=4$
$$ \mu(4)P(1) + \mu(2)P(2) + \mu(1) P(4) = 0 \cdot 0-1 \cdot 1 + 1 \cdot 2 = 1$$
Question
What is the orthodox way to prove this?
P.S: I am not formally trained in number theory.
You want to prove the Dirichlet convolution of two functions is identically $1$. This is equivalent to saying the product of these functions' Dirichlet series is the Dirichlet series of $1$, i.e. the zeta function. Since$$\sum_{n\ge1}\mu(n)n^{-s}=\prod_{p\in\Bbb P}\sum_{k\ge0}\mu(p^k)p^{-ks}=\prod_p(1-p^{-s})=\frac{1}{\zeta(s)},$$the other function needs to have Dirichlet series $\zeta^2(s)$. But$$\zeta^2(s)=\prod_p\frac{1}{(1-p^{-s})^2}=\prod_p\sum_k(k+1)p^{-ks}=\sum_nP(n)n^{-s},$$where $P$ needs to be the multiplicative function satisfying $P(p^k)=k+1$, which isn't quite what you had. Indeed, $P$ is the divisor function. The correct $n=4$ calculation is$$0\cdot1-1\cdot2+1\cdot3=1.$$