# $\sum_{k=0}^{n} a_{k}=\sum_{k=0}^{\lfloor n/2 \rfloor} a_{2k} +\sum_{k=0}^{\lfloor (n-1)/2 \rfloor}a_{2k+1}$

I would like to show that \begin{align} \sum_{k=0}^{n} a_{k}&=\sum_{k=0}^{\lfloor n/2 \rfloor} a_{2k} + \sum_{k=0}^{\lfloor (n-1)/2 \rfloor}a_{2k+1}\\ \end{align}

• I'm interested in more ways of prove it

My proof.

\begin{align} \sum_{k=0}^{n} a_{k}&=\sum_{\substack{k=0 \\ k \text{ is even }}}^{n} a_{k}+\sum_{\substack{k=0 \\ k \text{ is odd }}}^{n} a_{k}\\ &=\sum_{\substack{k=0 \\ k=2k' \text{ with } k'\in\mathbb{Z}}}^{n} a_{k}+\sum_{\substack{k=0 \\ k=2k'+1 \text{ with } k'\in\mathbb{Z}}}^{n} a_{k}\\ &=\sum_{\substack{k=0 \\ k'=\frac{k}{2} }}^{n} a_{2k'}+\sum_{\substack{k=0 \\ k'=\frac{k-1}{2} }}^{n} a_{2k'+1}\\ &=\sum_{\substack{k=0 \\ k'=\frac{k}{2}\\ k=0 \implies k'=0 \\ k=n \implies k'=\frac{n}{2}}}^{n} a_{2k'}+\sum_{\substack{k=0 \\ k'=\frac{k-1}{2}\\ \text{since k is odd can start with 1 and not 0 } k=1 \implies k'=0 \\ k=n \implies k'=\dfrac{n-1}{2} }}^{n} a_{2k'+1}\\ &=\sum_{k'=0}^{ n/2 } a_{2k'} + \sum_{k'=0}^{ (n-1)/2 }a_{2k'+1}\\ &\text{If $n$ is even, then $\frac{(n−1)}{2}$ is not an integer, which is why we need the floor.}\\ &\text{Similarly, if $n$ is odd, then $\frac{n}{2}$ is not an integer}\\ \sum_{k=0}^{n} a_{k}&=\sum_{k=0}^{\lfloor n/2 \rfloor} a_{2k} + \sum_{k=0}^{\lfloor (n-1)/2 \rfloor}a_{2k+1} \end{align}

• Is my proof correct
• I'm interested in more ways of prove it
• so that you don't have to worry that: even number may take odd value and vice versa – SiXUlm Oct 29 '15 at 12:36
• also, a small typo in the first line of your proof: in the second summation, $k$ should start from 1 instead of 0. – SiXUlm Oct 29 '15 at 12:37
• If $n$ is even, then $(n-1)/2$ is not an integer, which is why you need the floor. Similarly, if $n$ is odd, then $n/2$ is not an integer. – Mankind Oct 29 '15 at 12:37
• @HowDoIMath yes i see that's why i have to add floor thanks. what about my proof – Educ Oct 29 '15 at 12:43
• well, shoot. Yes, your idea is correct and what you are trying to express is clear. I'm not sure your notation of indexing is technically legitimate however. Normally one really shouldn't get bogged do in details like that. However in this case what you are trying to prove is simply "The sum of all terms is the sum of the even terms plus the sum of the odd terms" (which is obvious) and your proof is verifying that the reindexing is valid. – fleablood Oct 29 '15 at 13:15

$\sum_{k=0}^{\lfloor n/2 \rfloor} a_{2k}= \sum_{i=0; i\ is\ even}^{2\lfloor n/2 \rfloor} a_{i} = \sum_{i=0; i\ is\ even}^{n} a_{i} = \sum_{k=0; k\ is\ even}^{n} a_{k}$

$\sum_{k=0}^{\lfloor (n-1)/2 \rfloor} a_{2k + 1}= \sum_{i=0; i\ is\ odd}^{2\lfloor (n-1)/2 \rfloor + 1} a_{i} = \sum_{i=0; i\ is\ odd}^{n} a_{i}= \sum_{k=0; k\ is\ odd}^{n} a_{k}$

$\sum_{k=0}^n a_n = \sum_{k=0; k\ is\ even}^{n} a_{k} + \sum_{k=0; k\ is\ odd}^{n} a_{k} = \sum_{k=0}^{\lfloor n/2 \rfloor} a_{2k} + \sum_{k=0}^{\lfloor (n-1)/2 \rfloor} a_{2k + 1}$

• i think in the second line $i=1$ not $0$ since $i=2k+1$ – Educ Oct 29 '15 at 14:15

If $n$ is odd, i.e. $n=2m+1$,

then $k=0, 1, 2, 3, ..., 2m+1=\underbrace{(0, 2, 4, 6, .., \color{blue}{2m})}_{\underset{k=0, 1, ..., \lfloor n/2\rfloor}{2k}},(\underbrace{1, 3, 5, ..., 2m-1, \color{red}{2m+1}}_{\underset{k=0, 1, ..., \lfloor (n-1)/2\rfloor}{ 2k+1}})$
as \begin{align} &2\bigg\lfloor \frac n2 \bigg\rfloor&&=2\bigg\lfloor \frac {2m+1}2\bigg\rfloor&&=2\bigg\lfloor m+\frac 12 \bigg\rfloor&&=\color{blue}{2m}\\ &2\bigg\lfloor \frac {n-1}2 \bigg\rfloor+1&&=2\bigg\lfloor\frac{2m}2\bigg\rfloor+1&&&&=\color{red}{2m+1}\end{align}

If $n$ is even, i.e. $n=2m$,

then $k=0, 1, 2, 3, ..., 2m=\underbrace{(0, 2, 4, 6, .., \color{green}{2m})}_{\underset{k=0, 1, ..., \lfloor n/2\rfloor}{2k}},(\underbrace{1, 3, 5, ..., \color{orange}{2m-1}}_{\underset{k=0, 1, ..., \lfloor (n-1)/2\rfloor}{ 2k+1}})$
as \begin{align} &2\bigg\lfloor \frac n2 \bigg\rfloor&&=2\bigg\lfloor \frac {2m}2\bigg\rfloor&&=\color{green}{2m}\\ &2\bigg\lfloor \frac {n-1}2 \bigg\rfloor+1&&=2\bigg\lfloor\frac{2m-1}2\bigg\rfloor+1=2\underbrace{\bigg\lfloor m-\frac12\bigg\rfloor}_{m-1}+1=2(m-1)+1&&=\color{orange}{2m-1}\end{align}

Hence the formula $$\sum_{k=0}^{n} a_{k}=\sum_{k=0}^{\lfloor n/2 \rfloor} a_{2k} + \sum_{k=0}^{\lfloor (n-1)/2 \rfloor}a_{2k+1}\\$$ holds irrespective of whether $n$ is odd or even.