Homepage › Solution manuals › Ivan Niven › An Introduction to the Theory of Numbers › Exercise 4.1.14* (Prove $\sum_{j=1} \left \lfloor \frac{n}{2^j}+ \frac{1}{2} \right \rfloor = n $)
Exercise 4.1.14* (Prove $\sum_{j=1} \left \lfloor \frac{n}{2^j}+ \frac{1}{2} \right \rfloor = n $)
Consider an integer and the integers . For each find the number of ’s that are divisible by but not . Thus prove
and hence that we get the correct value for the sum if we replace each term by its nearest integer, using the larger one if two exist.
Answers
Proof.
- (a)
-
Let
. Consider the sets
so that is the set of multiples of between and , and the set of ’s between and that are divisible by but not . We want to estimate the number of elements of , written .
Note first that for all , because implies that . Moreover by definition of , so
By Theorem 4.1(10), we obtain
thus
The number of that are divisible by but not is .
- (b)
-
By Problem 6,
for any real number
. Applying this formula to
, we obtain
thus, by equation (2),
If , then if and only if . So
Therefore
so we obtain the desired result
- (c)
-
By Theorem 4.1(8),
is the nearest integer of
, using the larger one if two exist.
Note that
If we replace each term by its nearest integer, we obtain by equation (3) the same result :