Saroj Posted February 12, 2010 Report Posted February 12, 2010 I wanted to know if there is a exerting single Formula to evaluate the following : - nSp = 1^P + 2^P + 3^P..............n^P [ where P is any positive integer grater than 1 ] Quote
Turtle Posted February 12, 2010 Report Posted February 12, 2010 here's formulae for P=2 & 3. :naughty: might be something to start with for trying to qualify the general case. :singer: the sum of squares of first 'n' natural no`s-1^2+2^2+3^2+.....+n^2=n*(n+1)*(2n+1)/6 the sum of cubes of first 'n' natural no`s-1^3+2^3+3^3+4^3+......+n^3=(n^2 * (n+1)^2)/4 sum of squares and cubes of first 'N' natural no`s. Quote
lawcat Posted February 12, 2010 Report Posted February 12, 2010 Your question concerns sequences and progressions (geometric), so your answer may lie in Google:Geometric progression - Wikipedia, the free encyclopedia Quote
Saroj Posted February 13, 2010 Author Report Posted February 13, 2010 here's formulae for P=2 & 3. might be something to start with for trying to qualify the general case. :shrug: sum of squares and cubes of first 'N' natural no`s. Thanks but i know the formulas for 2 and 3 but what i am looking for is a generating formula for all values P. Quote
CraigD Posted February 13, 2010 Report Posted February 13, 2010 I wanted to know if there is a exerting single Formula to evaluate the following : - nSp = 1^P + 2^P + 3^P..............n^P [ where P is any positive integer grater than 1There is: [math]\sum_{x=1}^{n} x^P = \sum_{i=1}^{P+1} a_i (n+1)^i[/math] There’s a neat way to calculate [imath]a_i[/imath], via the equation [math]y^P = \sum_{i=1}^{P+1} a_i ((y+1)^i -y^i)[/math] which can be solved in order of greatest to least order term in a way similar to Jordan elimination with square matrixes. For example, finding [math]\sum_{x=1}^{n} x^5[/math], [math]0 = [/math] [math]y^5 -a_6((y+1)^6 –y^6) -a_5((y+1)^5 –y^5) -a_4((y+1)^4 –y^4) -a_3((y+1)^3 –y^3) -a_2((y+1)^2 –y^2) -a_1 =[/math] [math]y^5 -\frac{1}{6}(6y^5 +15y^4 +20y^3 +15y^2 +yX) -a_5((y+1)^5 –y^5) -a_4((y+1)^4 –y^4) -a_3((y+1)^3 –y^3) -a_2((y+1)^2 –y^2) -a_1 =[/math] [math]-\frac{5}{2}y^4 -\frac{10}{3}y^3 -\frac{5}{2}y^2 -y -1/6 +\frac{1}{2}(5y^4 +10y^3 +10y^2 +5y +1) -a_4((y+1)^4 –y^4) -a_3((y+1)^3 –y^3) -a_2((y+1)^2 –y^2) -a_1 =[/math] ... etc (notice how each [imath]a_i[/imath] is selected to zero the previous highers order term), giving [math]a_6=\frac{1}{6} \, , a_5=-\frac{1}{2} \, , a_4=\frac{5}{12} \, , a_3=0 \, , a_2= -\frac{1}{12} \, , a_1 = 0[/math] so, [math]\sum_{x=1}^{n} x^5 = \frac{1}{6}(n+1)^6 -\frac{1}{2}(n+1)^5 +\frac{5}{12}(n+1)^4 -\frac{1}{12}(n+1)^2[/math] Solving for P=2 or 3 gives the formulas Turtle quoted. Though easy to use, deriving this formula is a pretty impressive bit of algebra. Post it here (done on your own, not cheating by searching for a pretty webpage presenting it) and you’ll surely gain mad rep and admiration. :) Quote
Turtle Posted February 13, 2010 Report Posted February 13, 2010 Thanks but i know the formulas for 2 and 3 but what i am looking for is a generating formula for all values P. roger. i was suggesting you take those 2, see what terms they have in common & how they vary, and look for an algebraic method of generalizing them, or maybe generating the next, i.e. 1^4, 2^4, ... now i think lawcat's link to wiki article on geometric series has what you want; did you read that? so, back to the 2 & 3 formulae i referenced for sum poking like i'm thinking. mind you i don't know if it's the right approach, but i used a similar approach once to derive a generalized equation/expression for figurate numbers. :smart: :shrug: onward... the sum of squares of first 'n' natural no`s-1^2+2^2+3^2+.....+n^2=n*(n+1)*(2n+1)/6 the sum of cubes of first 'n' natural no`s-1^3+2^3+3^3+4^3+......+n^3=(n^2 * (n+1)^2)/4 so i see each expression has a power of n as the first variable. in the first equation the power is 1, then in the second equation it is 2. shall we hazzard the guess that the next in the sequence might be 3, that is, the first term of the equation for n^4 might be n^3? :shrug: can't hurt. so thens the next terms in each, (n+1) and (2n+1). could it be that the next is (3n+1)? anyway, you see i'm suggesting this as a possible approach & not that it is correct. discuss. :cup: ps as i was composing this, craig was composing as well & posted the preceding without my reading. :hyper: you'll wanna go with that 'cause he's one of the guys can tell us if i'm any where near the target here. :D you rock craig! :shrug: Quote
CraigD Posted February 19, 2010 Report Posted February 19, 2010 [math]\sum_{x=1}^{n} x^P = \sum_{i=1}^{P+1} a_i (n+1)^i[/math] Though easy to use, deriving this formula is a pretty impressive bit of algebra. Post it here (done on your own, not cheating by searching for a pretty webpage presenting it) and you’ll surely gain mad rep and admiration. :)Nobody (me included) has yet posted a derivation/proof of this, but in playing with it, I’ve noticed something remarkable. It appears [math]\sum_{x=1}^{n} x^P = \sum_{i=1}^{P+1} a_i (n+1)^i = -2a_{P-1}n^{P-1} + \sum_{i=1}^{P+1} a_i n^i [/math] For example, [math]\sum_{x=1}^{n} x^5 = \frac{1}{6}(n+1)^6 -\frac{1}{2}(n+1)^5 +\frac{5}{12}(n+1)^4 -\frac{1}{12}(n+1)^2 = \frac{1}{6}n^6 +\frac{1}{2}n^5 +\frac{5}{12}n^4 -\frac{1}{12}n^2[/math] PS: The [imath]a_i[/imath] calculating approach sketched in post #5 codes very tersely. In pseudocode:[imath]c_P = 1[/imath]do for i from P to 0 [imath]a_{(i+1)} = \frac{c_P}{i+1}[/imath] do for j from i to 0 [imath]c_j = c_j -a_{(i+1)} \binom{i+1}{j}[/imath] In MUMPS (where R(I) is [imath]a_i[/imath] in the above):k C,R s C(P)=1 f I=P:-1:0 d SRD(.C,C(I),I+1) s R(I+1)=C,B=1 f J=I:-1:0 d SRM(.B,B,J+1_"/"_(I-J+1)),SRM(.E,B,C),SRS(.E,$g(C(J)),E) s C(J)=E(SRD, SRM and SRS aren’t intrinsic MUMPS, but calls to unlimited precision rational math division, multiplication, and addition subroutines, ie: SRS(.A,B,C) means A=B+C) There’s something profoundly mathemagical about binomial coefficients. :) Quote
Don Blazys Posted February 20, 2010 Report Posted February 20, 2010 To: Craig D. That is an astute observation and a wonderful result. ;) Don. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.