This site is supported by donations to The OEIS Foundation.

# Liouville's function lambda(n)

The Liouville lambda function ${\displaystyle \lambda (n)=(-1)^{\Omega (n)}}$, where ${\displaystyle \Omega (n)}$ is the number of prime factors function (sometimes called "big omega"), tells whether ${\displaystyle n}$ has an odd or even number of prime factors, not necessarily distinct. Thus ${\displaystyle \lambda (n)=-1}$ when ${\displaystyle n}$ has an odd number of prime factors, and ${\displaystyle \lambda (n)=1}$ if ${\displaystyle n}$ has an even number of factors.

For example, ${\displaystyle \lambda (26)=1}$ because 26 has two prime factors (2 and 13) and so ${\displaystyle \lambda (26)=(-1)^{2}=1}$. ${\displaystyle \lambda (27)=-1}$ because 27 has three prime factors (3 thrice) and so ${\displaystyle \lambda (27)=(-1)^{3}=-1}$.

The function is completely multiplicative, meaning that ${\displaystyle \lambda (mn)=\lambda (m)\lambda (n)}$ regardless of whether ${\displaystyle \gcd(m,n)=1}$ or not. With ${\displaystyle \lambda (28)=-1}$ we exhibit that the function is completely multiplicative, since ${\displaystyle \lambda (28)=\lambda (2)\lambda (14)=\lambda (4)\lambda (7)=-1\times 1=1}$. See A008836 for more values.

The Liouville lambda function is sometimes notated ${\displaystyle \psi (n)}$.

 1     ${\displaystyle \lambda (n)\,}$
−1

## Properties

### Completely multiplicative

${\displaystyle \scriptstyle \lambda (n)\,}$ is a completely multiplicative arithmetic function, i.e.

${\displaystyle \lambda (mn)=\lambda (m)\cdot \lambda (n),\ m\,\geq \,1,\ n\,\geq \,1.\,}$
Theorem. The Liouville lambda function is completely multiplicative. Given ${\displaystyle \{m,n\}\in \mathbb {Z} ^{+}}$, the equality ${\displaystyle \lambda (mn)=\lambda (m)\lambda (n)}$ holds even when ${\displaystyle \gcd(m,n)>1}$.
Proof. Remember that ${\displaystyle \Omega (mn)=\Omega (m)+\Omega (n)}$ whether ${\displaystyle \gcd(m,n)=1}$ or not (whereas with the number of distinct prime factors function this would not be the case). Therefore, if ${\displaystyle \Omega (m)}$ is even and ${\displaystyle \Omega (n)}$ is also even, then so is ${\displaystyle \Omega (mn)}$ and thus ${\displaystyle \lambda (mn)=\lambda (m)\lambda (n)=(-1)^{\Omega (m)}(-1)^{\Omega (n)}=1\times 1=1}$. If ${\displaystyle \Omega (m)}$ is even but ${\displaystyle \Omega (n)}$ is odd, then ${\displaystyle \Omega (mn)}$ is odd and thus ${\displaystyle \lambda (mn)=1\times -1=1}$. But if both ${\displaystyle \Omega (m)}$ and ${\displaystyle \Omega (n)}$ are odd, then ${\displaystyle \Omega (mn)}$ is even and thus ${\displaystyle \lambda (mn)=-1\times -1=1}$. ENDOFPROOFMARK

### Sum over the divisors ${\displaystyle d\,}$ of ${\displaystyle n\,}$ of ${\displaystyle \lambda (d)\,}$

${\displaystyle \sum _{d|n}\lambda (d)={\begin{cases}1&{\mbox{if }}n{\mbox{ is a square,}}\;\\0&{\mbox{otherwise.}}\;\end{cases}}\,}$

## Dirichlet generating function

The Dirichlet generating function of ${\displaystyle \scriptstyle \lambda (n)\,}$ is

${\displaystyle D_{\{\lambda (n)\}}(s)\equiv \sum _{n=1}^{\infty }{\frac {\lambda (n)}{n^{s}}}={\frac {\zeta (2s)}{\zeta (s)}},\ s\,>\,1,\,}$

where ${\displaystyle \scriptstyle \zeta (s)\,}$ is the Riemann zeta function.

## Liouville's summatory function L(n)

As the Mertens function is to the Möbius function, so is the Liouville summatory function ${\displaystyle L(n)=\sum _{i=1}^{n}\lambda (i)}$ (see A002819). See Pólya's conjecture.

The partial sums of Liouville's function ${\displaystyle \scriptstyle \lambda (n)\,}$ give Liouville's summatory function L(n)

${\displaystyle L(n)\equiv \sum _{k=1}^{n}\lambda (k)=\sum _{k=1}^{n}(-1)^{\Omega (k)}\,}$

## Sequences

Liouville's function ${\displaystyle \scriptstyle \lambda (n),\ n\geq 1}$ (A008836) gives the sequence

{1, −1, −1, 1, −1, 1, −1, −1, 1, 1, −1, −1, −1, 1, 1, 1, −1, −1, −1, −1, 1, 1, −1, 1, 1, 1, −1, −1, −1, −1, −1, −1, 1, 1, 1, 1, −1, 1, 1, 1, −1, −1, −1, −1, −1, 1, −1, −1, 1, −1, 1, −1, −1, 1, 1, 1, 1, 1, ...}

The partial sums ${\displaystyle \scriptstyle L(n)\equiv \sum _{i=1}^{n}\lambda (i),\ n\geq 1}$ (A002819) give the sequence

{1, 0, −1, 0, −1, 0, −1, −2, −1, 0, −1, −2, −3, −2, −1, 0, −1, −2, −3, −4, −3, −2, −3, −2, −1, 0, −1, −2, −3, −4, −5, −6, −5, −4, −3, −2, −3, −2, −1, 0, −1, −2, −3, −4, −5, −4, −5, −6, −5, −6, −5, −6, −7, −6, −5, ...}