For any integer k and set of integers S, let fS(k) be the number of multiples of k in S. We can count the number of pairs (k,s) with k∈N dividing s∈S in two different ways, as follows:
- For each s∈S, there are d(s) pairs that include s, one for each divisor of s.
- For each k∈N, there are fS(k) pairs that include k, one for each multiple of k.
Therefore,
s∈S∑d(s)=k∈N∑fS(k)
Let
O={1,3,5,…,2n−1} and E={2,4,6,…,2n}
be the set of odd and, respectively, the set of even integers between 1 and 2n. It suffices to show that
k∈N∑fO(k)≤k∈N∑fE(k)
Since the elements of O only have odd divisors,
k∈N∑fO(k)=k odd ∑fO(k)
For any odd k, consider the multiples of k between 1 and 2n. They form a sequence
k,2k,3k,…,⌊k2n⌋k
alternating between odd and even terms. There are either an equal number of odd and even terms, or there is one more odd term than even terms. Therefore, we have the inequality
fO(k)≤fE(k)+1
for all odd k. Combining this with the previous observations gives us the desired inequality:
k∈N∑fO(k)=k odd ∑fO(k)≤k odd ∑(fE(k)+1)=k odd ∑fE(k)+n=k odd ∑fE(k)+fE(2)≤k∈N∑fE(k)