Skip to content

Liouville Function

The Liouville function is an arithmetic function denoted by

Prime Factors with Multiplicity

The Liouville function is an arithmetic function denoted by

λ(n). \lambda(n).

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

If

n=p1α1p2α2prαr n=p_1^{\alpha_1}p_2^{\alpha_2}\cdots p_r^{\alpha_r}

is the canonical prime factorization of nn, define

Ω(n)=α1+α2++αr. \Omega(n)=\alpha_1+\alpha_2+\cdots+\alpha_r.

Then the Liouville function is

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

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

Examples

For a prime number pp,

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

so

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

For

12=223, 12=2^2\cdot3,

we have

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

so

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

For

18=232, 18=2\cdot3^2,

we have

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

so

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

For

36=2232, 36=2^2\cdot3^2,

we have

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

so

λ(36)=1. \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

μ(n)=0 \mu(n)=0

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

For example,

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

because

2212. 2^2\mid12.

But

λ(12)=1. \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 aa and bb,

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

No coprimality assumption is needed.

Indeed,

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

because prime exponents add under multiplication. Therefore

λ(ab)=(1)Ω(ab)=(1)Ω(a)+Ω(b)=(1)Ω(a)(1)Ω(b)=λ(a)λ(b). \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αp^\alpha,

Ω(pα)=α. \Omega(p^\alpha)=\alpha.

Hence

λ(pα)=(1)α. \lambda(p^\alpha)=(-1)^\alpha.

Thus

λ(p)=1,λ(p2)=1,λ(p3)=1. \lambda(p)=-1, \qquad \lambda(p^2)=1, \qquad \lambda(p^3)=-1.

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

Divisor Sum Identity

The Liouville function satisfies the identity

dnλ(d)={1,n is a perfect square,0,n is not a perfect square. \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=p1α1prαr. n=p_1^{\alpha_1}\cdots p_r^{\alpha_r}.

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

dnλ(d)=i=1r(1+λ(pi)+λ(pi2)++λ(piαi)). \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 pip_i,

1+λ(pi)++λ(piαi)=11+1+(1)αi. 1+\lambda(p_i)+\cdots+\lambda(p_i^{\alpha_i}) = 1-1+1-\cdots+(-1)^{\alpha_i}.

This alternating sum equals 11 if αi\alpha_i is even and 00 if αi\alpha_i is odd.

Therefore the full product equals 11 exactly when every exponent αi\alpha_i is even, which is exactly when nn is a perfect square.

Summatory Liouville Function

The summatory Liouville function is

L(x)=nxλ(n). 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 λ(n)\lambda(n) behaved randomly, one would expect substantial cancellation in this sum.

The size of L(x)L(x) is connected with deep questions about the distribution of primes. In analytic number theory, estimates for sums involving λ(n)\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>1s>1,

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

This identity follows from Euler products. Since

λ(pα)=(1)α, \lambda(p^\alpha)=(-1)^\alpha,

the local factor at a prime pp is

11ps+1p2s=11+ps. 1-\frac1{p^s}+\frac1{p^{2s}}-\cdots = \frac{1}{1+p^{-s}}.

Multiplying over primes gives

p11+ps=p1ps1p2s=ζ(2s)ζ(s). \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 λ(n)\lambda(n) is linked to zeros of ζ(s)\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.