# How to express sum of even numbers in sigma notation

Given a positive integer number n, how can I express the sum of all positive even numbers up to n in sigma notation?

• You can use $$\sum_{k\text{ is odd},k\leqslant n}k$$
– Pedro
Commented Sep 29, 2013 at 0:49

$$2+4+6+\cdots+2 \left\lfloor\dfrac{n}2 \right\rfloor = \sum_{k=2,4,\ldots}^n k = \sum_{k=1}^{n/2} (2k) = 2\sum_{k=1}^{n/2} k$$

Given a real number $x$ we can define $\lfloor x \rfloor$ to be the greatest integer less than or equal to $x$. For instance, $\lfloor 3 \rfloor = 3$ and $\lfloor 7.81 \rfloor = 7$.

Thus we can write the sum of even integers less than or equal to $n$ as $$\sum_{k=0}^{\lfloor n/2 \rfloor} 2k$$ If you stare hard enough at this you'll see why it works: if $n$ is even then $\lfloor \frac{n}{2} \rfloor = \frac{n}{2}$, so the last term is $2 \cdot \frac{n}{2} = n$. If $n$ is odd then $\lfloor \frac{n}{2} \rfloor = \frac{n-1}{2}$, so the last term is $2 \cdot \frac{n-1}{2} = n-1$.

• Way too slow! Commented Sep 29, 2013 at 0:48

You can do this by the following methods:-

$$\sum_{k=1}^{\frac{n}{2}} 2k = 2\sum_{k=1}^{\frac{n}{2}} k$$

We assumed the upper limit to be $$n/2$$ as while multiplying by 2 the term doubles, See for yourself and $$2k$$ is always even.