Natural density


In number theory, natural density is one method to measure how "large" a subset of the set of natural numbers is. It relies chiefly on the probability of encountering members of the desired subset when combing through the interval as n grows large.
Intuitively, it is thought that there are more positive integers than perfect squares, since every perfect square is already positive, and many other positive integers exist besides. However, the set of positive integers is not in fact larger than the set of perfect squares: both sets are infinite and countable and can therefore be put in one-to-one correspondence. Nevertheless if one goes through the natural numbers, the squares become increasingly scarce. The notion of natural density makes this intuition precise for many, but not all, subsets of the naturals.
If an integer is randomly selected from the interval , then the probability that it belongs to A is the ratio of the number of elements of A in to the total number of elements in . If this probability tends to some limit as n tends to infinity, then this limit is referred to as the asymptotic density of A. This notion can be understood as a kind of probability of choosing a number from the set A. Indeed, the asymptotic density is studied in probabilistic number theory.

Definition

A subset A of positive integers has natural density α if the proportion of elements of A among all natural numbers from 1 to n converges to α as n tends to infinity.
More explicitly, if one defines for any natural number n the counting function a as the number of elements of A less than or equal to n, then the natural density of A being α exactly means that
It follows from the definition that if a set A has natural density α then 0 ≤ α ≤ 1.

Upper and lower asymptotic density

Let be a subset of the set of natural numbers For any put and.
Define the upper asymptotic density of by
where lim sup is the limit superior. is also known simply as the upper density of
Similarly,, the lower asymptotic density of, is defined by
where lim inf is the limit inferior. One may say has asymptotic density if, in which case is equal to this common value.
This definition can be restated in the following way:
if this limit exists.
It can be proven that the definitions imply that the following also holds. If one were to write a subset of as an increasing sequence indexed by the natural numbers
then
and
if the limit exists.
A somewhat weaker notion of density is the upper Banach density; given a set, define as

Properties and examples

Other density functions on subsets of the natural numbers may be defined analogously. For example, the logarithmic density of a set A is defined as the limit
Upper and lower logarithmic densities are defined analogously as well.
For the set of multiples of an integer sequence, the Davenport–Erdős theorem states that the natural density and logarithmic density are equal.