Sum of Powers

The sum of a series of n integers raised to an arbitrary power p may be expressed in terms of sums involving the next lower power p-1:

Sn(p) = 1p   + 2p   + 3p   + ... + (n-1)p   + np  
      = 1p-1 + 2p-1 + 3p-1 + ... + (n-1)p-1 + np-1
             + 2p-1 + 3p-1 + ... + (n-1)p-1 + np-1
                    + 3p-1 + ... + (n-1)p-1 + np-1
                                     .        .
                                     .        .
                                 + (n-1)p-1 + np-1
                                            + np-1

This equals n times the sum of the series of integers raised to the lower power minus the sums of the smaller series omitted at the beginning of each row:

  Sn(p) = nSn(p-1) - Σ n-1  Si(p-1) 
 
1
     
        = nSn(p-1) - Σ n  Si(p-1) + Sn(p-1)  
 
1
     
        = (n+1)Sn(p-1) - Σ n  Si(p-1) 
 
1

To find the sum of squares, Sn(2), note that Sn(1) = n(n+1)/2 = (n2 + n)/2

  Sn(2) = (n+1)Sn(1) - Σ n  Si(1) 
 
1
     
        = n(n+1)2/2 - n  i2 + Σ n  i)/2 
   
1 1
         
 2Sn(2) = n(n+1)2 - Sn(2) - n(n+1)/2
 3Sn(2) = n(n+1)[(n+1) - 1/2]
 
  Sn(2) =  n(n+1)(2n+1)
 
6

This result may be used to find the sum of cubes, Sn(3)

  Sn(3) = (n+1)Sn(2) - Σ n  Si(2) 
 
1
     
        = n(n+1)2(2n+1)/6 - (2Σ n  i3 + 3Σ n  i2 + Σ n  i)/6 
     
1 1 1
             
 6Sn(3) = n(n+1)2(2n+1) - 2Sn(3) - n(n+1)(2n+1)/2 - n(n+1)/2
 8Sn(3) = n(n+1)[(n+1)(2n+1) - (2n+1)/2 - 1/2]
        = n(n+1)[(n+1)(2n+1) - (n+1)]
        = n(n+1)2(2n)
 
  Sn(3) =  n2(n+1)2
 
4

Copyright © 2005 The Stevens Computing Services Company, Inc.  All rights reserved.