The **Liouville lambda function**, denoted by λ(*n*) and named after Joseph Liouville, is an important arithmetic function.
Its value is +1 if *n* is the product of an even number of prime numbers, and −1 if it is the product of an odd number of primes.

Explicitly, the fundamental theorem of arithmetic states that any positive integer *n* can be represented uniquely as a product of powers of primes: where *p*_{1} < *p*_{2} < ... < *p*_{k} are primes and the *a _{j}* are positive integers. (1 is given by the empty product.) The prime omega functions count the number of primes, with (Ω) or without (ω) multiplicity:

*ω*(*n*) =*k*,- Ω(
*n*) =*a*_{1}+*a*_{2}+ ... +*a*_{k}.

λ(*n*) is defined by the formula

- (sequence A008836 in the OEIS).

λ is completely multiplicative since Ω(*n*) is completely additive, i.e.: Ω(*ab*) = Ω(*a*) + Ω(*b*). Since 1 has no prime factors, Ω(1) = 0 so λ(1) = 1.

It is related to the Möbius function *μ*(*n*). Write *n* as *n* = *a*^{2}*b* where *b* is squarefree, i.e., *ω*(*b*) = Ω(*b*). Then

The sum of the Liouville function over the divisors of *n* is the characteristic function of the squares:

Möbius inversion of this formula yields

The Dirichlet inverse of Liouville function is the absolute value of the Möbius function, the characteristic function of the squarefree integers. We also have that .

The Dirichlet series for the Liouville function is related to the Riemann zeta function by

Also:

The Lambert series for the Liouville function is

where is the Jacobi theta function.

The Pólya problem is a question raised made by George Pólya in 1919. Defining

- (sequence A002819 in the OEIS),

the problem asks whether for *n* > 1. The answer turns out to be no. The smallest counter-example is *n* = 906150257, found by Minoru Tanaka in 1980. It has since been shown that *L*(*n*) > 0.0618672√*n* for infinitely many positive integers *n*,^{[1]} while it can also be shown via the same methods that *L*(*n*) < -1.3892783√*n* for infinitely many positive integers *n*.^{[2]}

For any , assuming the Riemann hypothesis, we have that the summatory function is bounded by

where the is some absolute limiting constant.^{[2]}

Define the related sum

It was open for some time whether *T*(*n*) ≥ 0 for sufficiently big *n* ≥ *n*_{0} (this conjecture is occasionally–though incorrectly–attributed to Pál Turán). This was then disproved by Haselgrove (1958), who showed that *T*(*n*) takes negative values infinitely often. A confirmation of this positivity conjecture would have led to a proof of the Riemann hypothesis, as was shown by Pál Turán.

More generally, we can consider the weighted summatory functions over the Liouville function defined for any as follows for positive integers *x* where (as above) we have the special cases and ^{[2]}

These -weighted summatory functions are related to the Mertens function, or weighted summatory functions of the Moebius function. In fact, we have that the so-termed non-weighted, or ordinary function precisely corresponds to the sum

Moreover, these functions satisfy similar bounding asymptotic relations.^{[2]} For example, whenever , we see that there exists an absolute constant such that

By an application of Perron's formula, or equivalently by a key (inverse) Mellin transform, we have that

which then can be inverted via the inverse transform to show that for , and

where we can take , and with the remainder terms defined such that and as .

In particular, if we assume that the
Riemann hypothesis (RH) is true and that all of the non-trivial zeros, denoted by , of the Riemann zeta function are simple, then for any and there exists an infinite sequence of which satisfies that for all *v* such that

where for any increasingly small we define

and where the remainder term

which of course tends to *0* as . These exact analytic formula expansions again share similar properties to those corresponding to the weighted Mertens function cases. Additionally, since we have another similarity in the form of to in so much as the dominant leading term in the previous formulas predicts a negative bias in the values of these functions over the positive natural numbers *x*.