The logarithmic density of a set of positive integers,
when the limit exists, is
Logarithmic density weights smaller integers more heavily than natural density. If a set
has natural density , then it also has logarithmic density
, but the converse need not hold. For example, let
consist of the integers
in the intervals
for nonnegative
integers
. Each full interval contributes
to the sum of the reciprocals, by comparison with
the integral of
over that interval. Here
denotes big-O notation.
There are
full intervals up to
and the final partial interval contributes a bounded amount.
The errors are summable, so
.
The numbers of elements of up to
and up to
are both
, the sum of the lengths
of the first
blocks. The corresponding proportions tend to
and
, respectively, so the natural
density does not exist.
By the Davenport-Erdős theorem, every union of sets of positive multiples has logarithmic density equal to its lower natural density (Davenport and Erdős 1936). This holds even if the upper and lower natural densities differ.
This density occurs naturally in results about multiplicative number theory and iterated arithmetic maps. For example, Tao (2022) formulated his almost-all result for the Collatz conjecture using logarithmic density.