proof of integral test
Consider the function (see the definition of floor)
Clearly for , being non increasing we have
hence
Since the integral of and on is finite we notice that is integrable on if and only if is integrable on .
On the other hand is locally constant so
and hence for all
that is is integrable on if and only if is convergent.
But, again, is finite hence is integrable on if and only if is integrable on and also is finite so is convergent if and only if is convergent.