Originally Posted by

**HallsofIvy** The sum of all integers from 1 to n is, as you noted in your first post, $\displaystyle \frac{n(n+1)}{2}$. Notice that the sum of **even** numbers, 2+ 4+ 6+ 8+ ...= 2(1+ 2+ 3+ 4+ ...) so that the sum of all even integers from 2 to **2n** is 2 times the sum of all numbers from 1 to n: The sum of all even numbers from 1 to 2n is $\displaystyle n(n+ 1)$. The sum of **odd** numbers, from 1 to 2n+ 1, is the sum of all integers from 1 to 2n+1 minus the sum of all even numbers from 2 to 2n:

$\displaystyle \frac{2n(2n+1)}{2}- n(n+1)= \frac{2n(2n+1)}{2}- \frac{2n(n+1)}{2}= \frac{2n(2n+1- (n+1))}{2}$

and that gives the very simple formula Wilmer indicates.