To find a sum of i(floor2019/i-floor2019/(i-1), i range from 2 to 2019

71 Views Asked by At

$$ \sum_{\text{i}=2}^{2019}{\text{i}\left( \left\lfloor \frac{\text{n}}{\text{i}}\right \rfloor -\left\lfloor \frac{\text{n}}{\text{i}-1} \right\rfloor \right)} $$ where n=2019 $$$$Obviously, this is equal to $$ -2019-\sum_{\text{i}=2}^{2018}{\left\lfloor \frac{\text{n}}{\text{i}} \right\rfloor} $$ But I can not step further.

1

There are 1 best solutions below

0
On BEST ANSWER

I don't see any way to do this without a good deal of arithmetic, but at least you don't actually have to do $2017$ divisions. Let $$a_k=\left\lfloor{2019\over k}\right\rfloor$$

We have $${2019\over2}=1009.5$$ so we not only know that $a_2=1009$, we know that $a_k=1$ for $1010\leq k\leq2018$

Then we have $${2019\over3}=673$$ so we not only know that $a_3=673$, we know $a_k=2$ for $674\leq k\leq1009$.

You have to continue this way until you get up to $\sqrt{2019}\approx44$.