Definition:Möbius Function

Let $$n \in \mathbb{Z}^*_+$$, that is, a positive integer.

The Moebius function is the function $$\mu: \mathbb{Z}^*_+ \to \mathbb{Z}^*_+$$ defined as:

$$\mu \left({n}\right) = \begin{cases} 1 & : n = 1 \\ 0 & : \exists p^2 \backslash n: p \in \mathbb{P} \\ -1^k & : n = p_1 p_2 \ldots p_k: p_i \in \mathbb{P} \end{cases} $$

That is:
 * $$\mu \left({n}\right) = 1$$ if $$n = 1$$;
 * $$\mu \left({n}\right) = 0$$ if $$n$$ has any divisor which is the square of a prime;
 * $$\mu \left({n}\right) = -1^k$$ if $$n$$ has $$k$$ distinct prime divisors.