Definition:Möbius Function

Let $n \in \Z_{>0}$, that is, a positive integer.

The Moebius function (or Möbius function) is the function $\mu: \Z_{>0} \to \Z_{>0}$ defined as:
 * $\mu \left({n}\right) = \begin{cases}

1 & : n = 1 \\ 0 & : \exists p \in \mathbb P: p^2 \backslash n\\ \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.