3
$\begingroup$

I want to compute the following sum $$S = \sum_{k=0}^{m} \left\lfloor \frac{k}{2}\right\rfloor.$$ Here is what I tried: $$ S = \sum_{k\geq 0, 2|k}^{m} \left\lfloor \frac{k}{2}\right\rfloor + \sum_{k\geq 0, 2\not |k}^{m} \left\lfloor \frac{k}{2}\right\rfloor.$$ If $m= 2t$ then $$S =\sum_{k\geq 0, 2|k}^{m} \left\lfloor \frac{k}{2}\right\rfloor + \sum_{k\geq 0, 2\not |k}^{m} \left\lfloor \frac{k}{2}\right\rfloor = \frac{t(t+1)}{2} + \frac{(t-1)t}{2} = t^2.$$ If $m= 2t+1$ then $$S = \sum_{k\geq 0, 2|k}^{m} \left\lfloor \frac{k}{2}\right\rfloor + \sum_{k\geq 0, 2\not |k}^{m} \left\lfloor \frac{k}{2}\right\rfloor = \frac{t(t+1)}{2} + \frac{t(t+1)}{2}= t(t+1).$$

But I am not sure if this is correct. Perhaps someone could give an indication.

$\endgroup$
  • 1
    $\begingroup$ You can write $t$ in terms of $m$ in each case. $\endgroup$ – Hello_World Jan 11 at 8:35
  • 1
    $\begingroup$ @Hello_World Actuallly, you can. $\endgroup$ – 5xum Jan 11 at 8:38
  • $\begingroup$ Are you asking me to write them in terms of $m$? I can do that if it helps. $\endgroup$ – Hello_World Jan 11 at 8:39
  • $\begingroup$ @KemonoChen, please write that as an answer so that we can downvote it. $\endgroup$ – Carsten S Jan 11 at 14:42
8
$\begingroup$

Yes, you are correct. You may also write the result as a more compact formula: $$\sum_{k=0}^{m} \left\lfloor \frac{k}{2}\right\rfloor= \begin{cases} t^2&\text {if $m=2t$}\\ t(t+1)&\text {if $m=2t+1$}\\ \end{cases}=\left\lfloor \frac{m^2}{4}\right\rfloor.$$ Indeed, if $m=2t$ then $$\left\lfloor \frac{m^2}{4}\right\rfloor=\left\lfloor t^2\right\rfloor=t^2$$ and if $m=2t+1$ then $$\left\lfloor \frac{m^2}{4}\right\rfloor=\left\lfloor t^2+t+\frac{1}{4}\right\rfloor=t(t+1).$$

$\endgroup$

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.