In text book Analytic number theory by Apostol on page $47$, Exercise $5$ we have the following:
Define $v(1)=0$, and for $n>1$ let $v(n)$ be the number of distinct prime factors of $n$. Let $f=\mu*v$ and prove that $f(n)$ is either $0$ or $1$.
The symbol $*$ is taken as the Dirichlet product.
I tried to divide cases into whether $n$ is square free or not. But I can't find anything. Please help me to solve it.
Let us call $\omega\left(n\right) $ the function that count the number of distinct prime factors of $n$. We have that $$\sum_{d\mid n}\delta_{p}\left(d\right)=\omega\left(n\right) $$ where $$\delta_{p}\left(d\right)=\begin{cases} 1, & d=p,\, p\textrm{ is a prime number}\\ 0, & \textrm{otherwise} \end{cases} $$ and we have done since, by Möbius inversion formula, we get $$f\left(n\right)=\sum_{d\mid n}\mu\left(d\right)\omega\left(\frac{n}{d}\right)=\delta_{p}\left(n\right).$$