Identity involving floor, ceiling and nearest integer functions

52 Views Asked by At

For $n\geqslant0$, $m>0$, $s>t\geqslant0$, $n,m,s,t$ - integers we have $$\sum\limits_{k=0}^{m-1}\left\lfloor{n+ks+t\over ms}\right\rfloor=\left\lfloor{n+t\over s}\right\rfloor$$ $$\sum\limits_{k=0}^{m-1}\left\lceil{n+ks+t\over ms}\right\rceil=\left\lceil{n+t\over s}\right\rceil+m-1$$ $$\sum\limits_{k=0}^{m-1}\left[{n+ks+t\over ms}\right]=\left[{n+t+\lceil{s\over 2}\rceil \lfloor{m\over 2}\rfloor+\lceil{s-1\over 2}\rceil \lfloor{m-1\over 2}\rfloor \over s}\right]$$ All of them are self-discovered. I'm looking for nice and simple closed form (and also maybe more simple proof) for the last.