Prince_James
11-14-05, 07:29 PM
Suppose I have a pattern that goes up by 2's along odd numbers, such as:
1, 3, 5, 7, 9
Suppose I also have a list of numbers that corresponds to this, such as:
1, 4, 9, 16, 25
Now, suppose I further have a number - in this case, 55 - that corresponds to the sum of the second set of numbers. Now, I seem to recall learning in highschool an algebraic way to determine this sum without having to actually add up the numbers themselves. That is, actually write out 1 + 4 + 9 + 16 + 25 = 55. However, I have -forgotten- this way, if indeed I ever learned it at all, so if any of you might recall how to do as such, I'd be most obliged if you told me.
The sum from 0 to N of n^2 is given by:
Sn = N(N+1)(2N+1)/6
Prince_James
11-14-05, 08:56 PM
1100f:
My thanks for the reply. However, I am a bit confused as to how to apply this to the above example. MIght you show me how to do as such? I tend to work well with examples.
Physics Monkey
11-14-05, 09:21 PM
It's fairly easy to do, in your case you want to sum S = 1 + 4 + 9 + 16 + 25, so what is the highest square appering? Well it's 25 which is 5^2, so you are summing all the squares up to N = 5 in 1100f's notation. According to the formula you get S = 5*(5+1)*(2*5+1)/6 = 55, just as promised.
Here are two more examples:
S = 1 + 4 + 9 = ?
Highest square is 9 = 3^2, so N = 3. Plugging in gives S = 3*(3+1)*(2*3+1)/6 = 14 and sure enough 1 + 4 + 9 = 14.
S = 1 + 4 + 9 + 16 + 25 + 36 + 49 + 64 = ?
Highest square is 64 = 8^2, so N = 8. Plugging in gives S = 8*(8+1)*(2*8+1)/6 = 204 and again you can find long hand that 1 + 4 + 9 + 16 + 25 + 36 + 49 + 64 = 204.
Hope that helps.
For example for the sum of the five first squares (1+4+9+16+25), N = 5, so you replace 5 imstead of N in the formula that I gave you and you get 5*6*11/6 = 11.
If you want the sum of the ten first squares you will get: 10*11*21/6 = 385 and indeed 1+4+9+16+25+36+49+64+81+100 = 385
1+2^2+3^3+...+N^2=N(N+1)(2N+1)/6 like 1100f said.
If you want to find 1+2^2+3^2+4^2+5^2, take N=5 and get:
5(5+1)(10+1)/6=55
If you want to find 1+2^2+3^2+4^2+5^2+6^2+7^2, take N=7 and get:
7(7+1)(15)/6=140
etc.
The sum of the first N integers, 1+2+3+...+N is N(N+1)/2, which you can use to find the sum of the first N odd integers (try to work out the details).
In general the sum of the first N mth powers will be given by a polynomial of degree m+1. See http://mathworld.wolfram.com/PowerSum.html for details on how to find this polynomial in terms of bernoulli numbers (it also gives them explicitly up to m=10).
Physics Monkey
11-14-05, 09:25 PM
Well, I think Prince James will have plenty of examples now. :p
Perhaps the second list being a list of squares is incidental.
I think that the salient attribute of the elements of the second list is that it they are a running sum of the first list... I'm not sure that Prince James clued on that it is a list of squares.
Prince_James
11-14-05, 09:59 PM
My thanks! You have been -more- than helpful. And yes, the second list was a list of squares.
Hector Berlioz
11-30-05, 04:17 PM
Well now pete brings up a good piont the couldn't the sum of the secound set be writen as a double sum?