Density Examples
Density Examples
Density Examples
There are many ways that the density of an integer sequence has been considered.
Perhaps the most natural is the natural density. For a sequence of positive integers S, define
A(x) to be the counting function for S, i.e.,
A(x) = |{n ∈ S : 1 ≤ n ≤ x}|.
So A(x) is the number of terms in S that are less than or equal to x. Then, the natural density
of S is defined to be
A(x)
d(S) = lim
x→∞ x
provided the limit exists.
We see that if S consists of all positive integers, then A(x) = x, and so d(S) = 1.
If S consists of all odd positive integers, then A(x) = b x+1
2
c, so
x+1 x+1
− 1 ≤ A(x) ≤
2 2
and so
1 1 A(x) 1 1
− ≤ ≤ + .
2 2x x 2 2x
A(x) 1
Hence, lim = , and so d(S) = 12 for the odd positive integers.
x→∞ x 2
If we let m be a positive integer, and B a set of residue classes modulo m, and let S be the set
of all positive integers that fall into an element of B, then, with an argument similar to the one
above,
|B|
d(S) = .
m
So for example, the set of integers congruent to 1, 4 or 7 modulo 8 has natural density 83 .
1 1 1 1 1 1 p2 + p − 1
1− + − + − + − · · · = .
p2 p3 p4 p5 p6 p7 p2 + p
5
For example, the set of numbers not exactly divisible by an even power of 2 has density 6
and
the set of numbers not exactly divisible by an even power of 3 has density 11
12
.
Now, heuristically, treating these densities as probabilities we can calculate the density of the
full sequence S. For an integer n to be in S, it must not by exactly divisible by an even power
of 2, and it must not be exactly divisible by an even power of 3, and it must not be divisible by
an even power of 5, etc.
Hence, the probability that the number is not divisible by an even power of any prime is
Y p2 + p − 1 Y 1
= 1− .
p
p2 + p p
p(p + 1)
where the product is over all primes. This is the density of the set S.
A more formal argument can be made with Dirichlet series. This begins by noting that, for any
complex z,
Y 1 + p−z − p−2z
Y
X
−z 1 1 1
L(z) = n = 1 + z + 3z + 5z + · · · = −2z
.
n∈S p
p p p p
1 − p
L(z)
µ(S) =Resz=1 L(s) = lim+
z→1 ζ(z)
Y 1 − 2p−2z + p−3z
= lim
z→1
p
1 − p−2z
Y 1 − 2p−2 + p−3 Y 1
= = 1− .
p
1 − p−2 p
p(p + 1)
0.704442203598081...
and by bounding the tail we can conclude that the true density d(S) is in the range