Explanation for sum of sequence

63 Views Asked by At

I saw that in a textbook. Could somebody explain how this sum of a sequence was obtained?

⌈n/2⌉+...+⌈n/2⌉+⌈n/2⌉ = ⌈(n+1)/2⌉⌈n/2⌉


OP has indicated in the comments that the above series contains $n/2$ terms.

3

There are 3 best solutions below

2
On

Without more of a context it is impossible to know.

There are some number $k$ of copies of $\lceil n/2\rceil$ being added up, so the total is $k\cdot\lceil n/2\rceil$.

Evidently $k=\lceil (n+1)/2\rceil$ here, but you have given no information about why this might be true.

2
On

Apply the identity

$\displaystyle \sum_{k=0}^n \left\lfloor\dfrac{k}{m}\right\rfloor=\left\lfloor\dfrac{n}{m}\right\rfloor\left(n+1-\dfrac{m}{2}-\dfrac{m}{2}\left\lfloor\dfrac{n}{m}\right\rfloor\right)$

with $m=2$ then

$\displaystyle \sum_{k=0}^n \left\lfloor\dfrac{k}{2}\right\rfloor=\left\lfloor\dfrac{n}{2}\right\rfloor\left(n-\left\lfloor\dfrac{n}{2}\right\rfloor\right)=\left\lfloor\dfrac{n}{2}\right\rfloor\cdot\left\lfloor\dfrac{n+1}{2}\right\rfloor=\left\lfloor\dfrac{n^2}{4}\right\rfloor$

where Hermite's identity: $\left\lfloor\dfrac{n}{2}\right\rfloor+\left\lfloor\dfrac{n+1}{2}\right\rfloor=n$

0
On

@Daniel Donnelly

Get $k=mp+q$ with $0\le q\le m-1$ $0\le p\le \left\lfloor\dfrac{n-q}{m}\right\rfloor= \left\lfloor\dfrac{n}{m}\right\rfloor -1$ Therefore $\max(k)=m\left(\left\lfloor\dfrac{n}{m}\right\rfloor-1\right)+m-1= m\left\lfloor\dfrac{n}{m}\right\rfloor -1$ and plus range $m\left\lfloor\dfrac{n}{m}\right\rfloor\le k\le n $ \begin{align*} \sum_{k=0}^n\left\lfloor\dfrac{k}{m}\right\rfloor&=\sum_{p=0}^{\left\lfloor\frac{n}{m}\right\rfloor-1}\sum_{q=0}^{m-1} \left\lfloor\dfrac{mp+q}{m}\right\rfloor+\sum_{k=m \left\lfloor\frac{n}{m}\right\rfloor}^n \left\lfloor\dfrac{k}{m}\right\rfloor \\ &=\sum_{p=0}^{\left\lfloor\frac{n}{m}\right\rfloor-1}mp+\left(n+1-m \left\lfloor\dfrac{n}{m}\right\rfloor\right) \left\lfloor\dfrac{n}{m}\right\rfloor \\ &=\dfrac m2\left(\left\lfloor\dfrac{n}{m}\right\rfloor-1\right) \left\lfloor\dfrac{n}{m}\right\rfloor+ \left(n+1-m \left\lfloor\dfrac{n}{m}\right\rfloor\right) \left\lfloor\dfrac{n}{m}\right\rfloor \\ &= \left\lfloor\dfrac{n}{m}\right\rfloor\left(n+1-\dfrac m2-\dfrac m2\left\lfloor\dfrac{n}{m}\right\rfloor\right) \end{align*}