# Liouville Function

## Prime Factors with Multiplicity

The Liouville function is an arithmetic function denoted by

$$
\lambda(n).
$$

It is defined using the total number of prime factors of $n$, counted with multiplicity.

If

$$
n=p_1^{\alpha_1}p_2^{\alpha_2}\cdots p_r^{\alpha_r}
$$

is the canonical prime factorization of $n$, define

$$
\Omega(n)=\alpha_1+\alpha_2+\cdots+\alpha_r.
$$

Then the Liouville function is

$$
\lambda(n)=(-1)^{\Omega(n)}.
$$

Thus $\lambda(n)$ is $1$ when $n$ has an even number of prime factors counted with multiplicity, and $-1$ when it has an odd number.

## Examples

For a prime number $p$,

$$
\Omega(p)=1,
$$

so

$$
\lambda(p)=-1.
$$

For

$$
12=2^2\cdot3,
$$

we have

$$
\Omega(12)=2+1=3,
$$

so

$$
\lambda(12)=(-1)^3=-1.
$$

For

$$
18=2\cdot3^2,
$$

we have

$$
\Omega(18)=1+2=3,
$$

so

$$
\lambda(18)=-1.
$$

For

$$
36=2^2\cdot3^2,
$$

we have

$$
\Omega(36)=4,
$$

so

$$
\lambda(36)=1.
$$

The function depends on multiplicity, not merely on the distinct prime factors.

## Comparison with the Möbius Function

The Liouville function resembles the Möbius function, but they differ in an important way.

The Möbius function is

$$
\mu(n)=0
$$

when $n$ is divisible by a square. The Liouville function never vanishes.

For example,

$$
\mu(12)=0,
$$

because

$$
2^2\mid12.
$$

But

$$
\lambda(12)=-1.
$$

The Möbius function detects squarefree structure. The Liouville function records the parity of the total number of prime factors, including repeated factors.

## Complete Multiplicativity

The Liouville function is completely multiplicative. This means that for all positive integers $a$ and $b$,

$$
\lambda(ab)=\lambda(a)\lambda(b).
$$

No coprimality assumption is needed.

Indeed,

$$
\Omega(ab)=\Omega(a)+\Omega(b),
$$

because prime exponents add under multiplication. Therefore

$$
\lambda(ab) =
(-1)^{\Omega(ab)} =
(-1)^{\Omega(a)+\Omega(b)} =
(-1)^{\Omega(a)}(-1)^{\Omega(b)} =
\lambda(a)\lambda(b).
$$

This is stronger than ordinary multiplicativity.

## Values on Prime Powers

For a prime power $p^\alpha$,

$$
\Omega(p^\alpha)=\alpha.
$$

Hence

$$
\lambda(p^\alpha)=(-1)^\alpha.
$$

Thus

$$
\lambda(p)=-1,
\qquad
\lambda(p^2)=1,
\qquad
\lambda(p^3)=-1.
$$

Every value of $\lambda(n)$ is obtained by multiplying these prime-power contributions.

## Divisor Sum Identity

The Liouville function satisfies the identity

$$
\sum_{d\mid n}\lambda(d) =
\begin{cases}
1, & n \text{ is a perfect square},\\
0, & n \text{ is not a perfect square}.
\end{cases}
$$

To see this, write

$$
n=p_1^{\alpha_1}\cdots p_r^{\alpha_r}.
$$

Since $\lambda$ is multiplicative, the divisor sum factors as

$$
\sum_{d\mid n}\lambda(d) =
\prod_{i=1}^{r}
\left(1+\lambda(p_i)+\lambda(p_i^2)+\cdots+\lambda(p_i^{\alpha_i})\right).
$$

For each prime $p_i$,

$$
1+\lambda(p_i)+\cdots+\lambda(p_i^{\alpha_i}) =
1-1+1-\cdots+(-1)^{\alpha_i}.
$$

This alternating sum equals $1$ if $\alpha_i$ is even and $0$ if $\alpha_i$ is odd.

Therefore the full product equals $1$ exactly when every exponent $\alpha_i$ is even, which is exactly when $n$ is a perfect square.

## Summatory Liouville Function

The summatory Liouville function is

$$
L(x)=\sum_{n\le x}\lambda(n).
$$

This function measures the imbalance between integers with an even number of prime factors and integers with an odd number of prime factors.

If the signs of $\lambda(n)$ behaved randomly, one would expect substantial cancellation in this sum.

The size of $L(x)$ is connected with deep questions about the distribution of primes. In analytic number theory, estimates for sums involving $\lambda(n)$ reflect how prime factors are distributed among integers.

## Relation to the Riemann Hypothesis

The Liouville function has a close analytic connection with the Riemann zeta function.

For $s>1$,

$$
\sum_{n=1}^{\infty}\frac{\lambda(n)}{n^s} =
\frac{\zeta(2s)}{\zeta(s)}.
$$

This identity follows from Euler products. Since

$$
\lambda(p^\alpha)=(-1)^\alpha,
$$

the local factor at a prime $p$ is

$$
1-\frac1{p^s}+\frac1{p^{2s}}-\cdots =
\frac{1}{1+p^{-s}}.
$$

Multiplying over primes gives

$$
\prod_p \frac{1}{1+p^{-s}} =
\prod_p \frac{1-p^{-s}}{1-p^{-2s}} =
\frac{\zeta(2s)}{\zeta(s)}.
$$

This identity explains why cancellation in $\lambda(n)$ is linked to zeros of $\zeta(s)$.

## Role in Number Theory

The Liouville function is a simple but powerful probe of prime factorization. It compresses the full multiplicative structure of an integer into one sign.

Its complete multiplicativity makes it algebraically clean. Its summatory behavior makes it analytically deep.

Together with the Möbius function, it is one of the central sign functions of multiplicative number theory. It appears in divisor sums, Euler products, prime distribution, and analytic reformulations of major conjectures.

