TITLE: A formula for $\lfloor n\rfloor+\left\lfloor \frac n2\right\rfloor+ \left\lfloor \frac n3\right\rfloor+\ldots+\left\lfloor \frac nk\right\rfloor$?
QUESTION [10 upvotes]: Is there any formula to calculate:
$$\lfloor n\rfloor+\left\lfloor \frac n2\right\rfloor+ \left\lfloor \frac n3\right\rfloor+\ldots+\left\lfloor \frac nk\right\rfloor$$
with $n$ and $k$  positive integers and $k\leq n$.

REPLY [5 votes]: It  does not seem that there exists a closed formula. Indeed, let us denote the sum to be calculated by $S_{n,k}$. Specializing to the case $k=n$ corresponds to the entry A006218 at OEIS, which only provides asymptotic estimates:
$$n \left(\ln n + 2 \gamma - 1\right)  - 4 \sqrt n - 1 \leq S_{n,n} \leq n \left(\ln n + 2 \gamma - 1\right) + 4 \sqrt n.$$