Summation over k of Floor of k over 2

Theorem

 * $\ds \sum_{k \mathop = 1}^n \floor {\dfrac k 2} = \floor {\dfrac {n^2} 4}$

Proof
By Permutation of Indices of Summation:
 * $\ds \sum_{k \mathop = 1}^n \floor {\dfrac k 2} = \sum_{k \mathop = 1}^n \floor {\dfrac {n + 1 - k} 2}$

and so:
 * $\ds \sum_{k \mathop = 1}^n \floor {\dfrac k 2} = \dfrac 1 2 \sum_{k \mathop = 1}^n \paren {\floor {\dfrac k 2} + \floor {\dfrac {n + 1 - k} 2} }$

First take the case where $n$ is even.

For $k$ odd:
 * $\floor {\dfrac k 2} = \dfrac k 2 - \dfrac 1 2$

and:
 * $\floor {\dfrac {n + 1 - k} 2} = \dfrac {n + 1 - k} 2$

Hence:

For $k$ even:
 * $\floor {\dfrac k 2} = \dfrac k 2$

and:
 * $\floor {\dfrac {n + 1 - k} 2} = \dfrac {n + 1 - k} 2 - \dfrac 1 2 = \dfrac {n - k} 2$

Hence:

So:

Next take the case where $n$ is odd.

For $k$ odd:
 * $\floor {\dfrac k 2} = \dfrac k 2 - \dfrac 1 2$

and:
 * $\floor {\dfrac {n + 1 - k} 2} = \dfrac {n + 1 - k} 2 - \dfrac 1 2$

Hence:

For $k$ even:
 * $\floor {\dfrac k 2} = \dfrac k 2$

and:
 * $\floor {\dfrac {n + 1 - k} 2} = \dfrac {n + 1 - k} 2$

Hence:

Let $n = 2 t + 1$.

Then: