Liouville function
= Liouville function
{c}
{title2=$\lambda(n)$}
The <Liouville function> is
$$
\lambda(n)=(-1)^{\Omega(n)},
$$
where $\Omega(n)$ is the <total number of prime factors>, counted with multiplicity. For example, $\lambda(1)=1$, $\lambda(12)=(-1)^3=-1$ and $\lambda(4)=1$. Multiplication adds <prime exponents>, so $\Omega(ab)=\Omega(a)+\Omega(b)$ and $\lambda(ab)=\lambda(a)\lambda(b)$ for all <positive integers> $a,b$. Thus it is a <completely multiplicative function>.
On <square-free integers> it agrees with the <Möbius function>. On other <positive integers> the distinction matters: $\mu(4)=0$, whereas $\lambda(4)=1$. The <Liouville function> records the <parity> of all <prime factors>, rather than suppressing <integers> with repeated <prime factors>.