Logarithmic integral

The logarithmic integral that appears in the context of the prime counting function is the special function denoted by Li(x).

The (offset) logarithmic integral is defined as:

Li(x)=2xdtlogt

Approximation of π(x)

The function Li(x) provides a much more accurate approximation to π(x) than the simpler estimate xlogx (prime number theorem). In fact, the Prime Number Theorem implies that:

π(x)Li(x)

meaning that the relative error tends to zero as x:

limxπ(x)Li(x)=1

Moreover, the difference π(x)Li(x) changes sign infinitely often, as shown by Littlewood in 1914.