# Sum of all integers from n to 2n

1. Jan 24, 2008

### iamhumble

1. The problem statement, all variables and given/known data

What is the sum of all the even numbers from 0 to 2n, for any positive integer n?

2. Relevant equations

does not apply

3. The attempt at a solution

On any other day I would be able to solve the problem within seconds. However, my brain is fried beyond repair at the moment.

First, I want to know if I understand the question correctly. So, I have the equation "0 to 2n" and when "n = 2" the equation will now be "0 to 4". Now, when I sum up all the even integers do I also include 4 or not? The word "to" is messing it up. I know it is lame but I can't think straight now.

I believe that I do include the even values from 0 to 4 when "n=2". If this is the case, the sum will be 2 + 4 = 6.

Here are other sum values I have computated:

when n = 3, sum is 2 + 4 + 6 = 12
when n = 4, sum is 2 + 4 + 6 + 8 = 20
when n = 5, sum is 2 + 4 + 6 + 8 + 10 = 30​

I have be doing my best to develop an equation to satisfy the sum for any positive inter n and the only thing I could come up with is this.

given a positive n integer, take (n^n) + n to get the sum of all the even positive integer value ​

Wait. I just figured out the equation!

All I am asking assistance for is if I have the correct understanding above. Any suggestions will be nice.

2. Jan 25, 2008

### CompuChip

You got it correct, and you also posted almost the correct answer.
There's a famous story about how Gauss added up the numbers 1 to 100 very quickly, which leads to some nice counting techniques.

3. Jan 25, 2008

### CEL

Johann Carl Friedrich Gauss solved this problem when he was 7, at elementary school.
The terms of your series are:
0, 2, 4, ... 2n-4, 2n-2, 2n.
Gauss figured that:
0 + 2n = 2n
2 + (2n-2) = 2n
4 + (2n-4) = 2n
....
Since there are n+1 terms from 0 to 2n, there are (n+1)/2 sums, so
$$Sum = \frac{2n\left(n+1\right)}{2}$$

Last edited: Jan 25, 2008
4. Jan 25, 2008

### iamhumble

Thanks for the feedback and the "counting techniques" web site. It appears very useful.

I believe I am correct with my equation of "(n^n)+n" because the question that was asked has the following to say..

"What is the sum of all the even numbers ..."

The keyword here is "even".

I do agree that if I have to add up all "even" and "odd" numbers then Guass formula could be used. Boy, do I wish to have his brain power.

5. Jan 26, 2008

### Gib Z

Aww come on dude, I'm sure no matter how brain fried you are you can see how the sum of the even numbers can be reduced to the same problem gauss solved? Try taking out a common multiple.

6. Jan 26, 2008

### CEL

The example I gave in my previous post considers only even numbers and I used Gauss's reasoning to derive it.

7. Jan 26, 2008

### HallsofIvy

Staff Emeritus
Have you considered adding all the numbers from 1 to n and then multiplying by 2?

8. Jan 26, 2008

### CompuChip

Perhaps then there is a miscommunication about the meaning of the symbol ^.
I read it as "to the power" and then for n = 2, 3 and 4 then I get
(2^2) + 2 = 4 + 2 = 6
(3^3) + 3 = 27 + 3 = 30
(4^4) + 4 = 256 + 4 = 260
respectively (disclaiming any errors in elementary multiplication ).

Anyway, I'm sure you saw the pattern but it's also important to write it down correctly

As for your problem, suppose I have
0 2 4 6 8 10 12 14
Try applying the same technique Gauss (supposedly, I don't really trust the story) did, adding them from the outside inwards.