Definition:Möbius Function

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

The Moebius function (or Möbius function) is the function $$\mu: \Z^*_+ \to \Z^*_+$$ defined as:
 * $$\mu \left({n}\right) =

\begin{cases} 1 & : n = 1 \\ 0 & : \exists p^2 \backslash n: p \in \mathbb{P} \\ \left({-1}\right)^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, i.e. $$n$$ is not square-free;
 * $$\mu \left({n}\right) = \left({-1}\right)^k$$ if $$n$$ has $$k$$ distinct prime divisors.

The Moebius Function is Multiplicative.