TITLE: How do I evaluate this sum(involving the floor function)?
QUESTION [14 upvotes]: $$
\sum_{i=1}^N\left\lfloor\frac{N}{i}\right\rfloor
$$
Is there a closed form expression to the above sum? (Mathematica doesn't give me anything)

REPLY [2 votes]: The sequence $a_n=\sum_{k=1}^{n}\left\lfloor\frac{n}{k}\right\rfloor$  is integer sequence A006218 in the OEIS. It is equal to a function called the divisor summatory function; i.e., it is equal to the sum over the divisor function:
$$a_n=\sum_{k=1}^{n}\left\lfloor\frac{n}{k}\right\rfloor=\sum_{k=1}^{n}d(k)=D(n).$$