For a set of nonnegative integers, its natural density is the limiting proportion of the first nonnegative integers that belong to :
provided this limit exists. Write for the counting function. The numerator is a finite cardinality; the denominator is exactly , including zero. Every existing natural density lies between zero and one.
For the even nonnegative integers , there are elements below and below . Thus using the ceiling function, and . For the square numbers , the exact count for is
The floor function counts the allowed indices , and the extra one counts zero. At , the square numbers below ten are , so the proportion is ; at , it is . The count grows like the square root of , while the denominator grows like .
The prime numbers also have natural density zero. If is their set, the Prime number theorem gives , hence . The Prime number theorem is a substantial result about the count, rather than a consequence of the fact that there are infinitely many prime numbers. [ref]
Why use natural density when cardinality already measures size? The even nonnegative integers, the square numbers, and the prime numbers all have the same countably infinite cardinality, yet their proportions among large initial integer intervals differ. Natural density distinguishes frequent membership from sparse membership. Equivalently, under a uniform distribution on a finite set of possible nonnegative integers, is the probability of landing in . A set without natural density shows why this limiting proportion need not exist.
Figure 1.
Exact proportions below N: even integers, squares, and an alternating-block set
. Every point uses the count in divided by , with zero included among the even integers and square numbers. The right panel marks exact block-boundary counts for a set without natural density. Its low and high proportions approach and along different subsequences. Details.
Include the positive integers in , and exclude the intervening integer intervals and zero. Equivalently, include for . Each included block is large enough to raise the running proportion; the following excluded block lowers it again.
With , the exact boundary counts follow from a geometric series:
The first sum is empty at . Dividing by the corresponding boundary, rather than using one denominator for both, gives
For example, , whereas , yielding proportions and . For , the exact count is ; for it stays . Hence the proportion increases through each included block and decreases through each excluded block. These boundary subsequences give the actual limit inferior and limit superior:
Since these differ, has no natural density. Its upper asymptotic density still records its largest limiting proportion.
For a subset of the positive integers, its upper asymptotic density is
The limit superior keeps the largest limiting proportion even when the running proportions oscillate. Because they lie in , this limit superior always exists in . If natural density exists, upper asymptotic density equals it.
The convention here uses , while natural density above uses . Replacing one interval by the other changes a count by at most one, so the proportions differ by at most and have the same limit superior. For the set without natural density above, the count in is six rather than five, because is included and zero is absent. Nevertheless its upper asymptotic density is exactly . The even positive integers have upper asymptotic density and the prime numbers have upper asymptotic density zero.
The useful feature is that a large proportion along arbitrarily large initial integer intervals already supplies structure. The Szemerédi theorem says that positive upper asymptotic density forces arithmetic progressions of every finite length, with positive common difference, even without an existing natural density. Szemerédi's 1975 paper resolved this general finite-length problem; it makes density a bridge from counting to additive structure. [ref]
An increasing sequence of integers has full density when its range has natural density one. Convergence in density of a sequence means that, for each fixed tolerance, the exceptional indices have natural density zero.

Articles by others on the same topic (1)