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$?

626 Views Asked by At

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$.

1

There are 1 best solutions below

4
On

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.$$