A. Abdesselam (December 2005) In the following text, a geometrical way to derive the sum and alternate sum of differente powers of integral numbers (ie sum of normal, sqaures, cubes,...etc.) is presented. To estabilish the method, we start by the 2 dimension case. 2 dimension: ============ suppose we want to constuct a square from the imediately smaller sqaure to it. There are two cases: we can start either from an even or an odd square (ie a square which has a side of even or odd times the unit lenght. 1) Odd numbers case Consider first the case of an odd square. The smallest square we can start from is a saqure cube a side of lenght one (ie one uint of lenght, one centimer for example), Fig.1a. This is the unit sqaure . We can constrcut the next square, which must be a square of side of 3 units, in tow steps; first by sticking a square to each side Fig.1b (this makes 4 squares), and then attacging a square to each corener Fig.1c (this makes also 4 squares). 1a 1b 1c --- --- --- | | | | | | --- --- --- --- --- --- --- | | | | | | | | --- --- --- --- --- --- --- | | | | | | --- --- --- So we can write: 3x3 = 9 = 1 + 4 + 4 Consider now the case wehere one starts from a square with a side of L unit lenght (one can imagine,for example, the case of L=3). The aimed to square has a side of lenght L+2. We can do that, as before, in two steps: - to each of the 4 sides (of lenght L), we sitck L squares. This makes 4L squares - to each of the 4 corners (there are alyways 4 corners), we attach one squaure. This makes 4 squares So, the square of side L+2 unit lenght can be constructed from the one of side L by adding 4L+4 unit squares. But the sqaure of L could be also made from the one of side L-2 in the same maner. This process can be repeated until we reach the sqaure of side one unit lenght. We can see that, in general, a square of side L (L odd), can be constructed by successively adding layers of unit squares starting from the smallest one. that is the unit square: n=L-2 L^2 = 1 + Sum (4n + 4) (1) n=1 where L is odd and the sum runs on odd numbers only (ie n=1,3,5,...,L-2). 2) Even numbers case The case of squares with an even side is just similar the case with and odd lenght side. The smallest square one can start with is a square of side equal to two unit lenght (ie it conatians four unit sqaure). One cam easily show that: n=L-2 L^2 = Sum (4n + 4) (2) n=0 where L is even and the sum runs on even numbers only (ie n=0,2,4,6,...,L-2). Remark: equations (1) and (2) can be used to find the solutions of Pythagore's relation for integers case. Now, the intersting thing, especialy at higher dimensions, is that if one merges the equations (1) and (2) by adding or subracting then, one can have a sum or an alternate sum of integers that may be expressed as a polynomial of degree 2. Consider the addition first and suppose L is odd (ie L-1 is even). One have then n=L-2 i=L-3 L^2 + (L-1)^2 = 1 + Sum (4n + 4) + Sum (4i + 4) n=1 i=0 where n=1,3,...L-2 and i=0,2,4,...,L-3. n=L-2 = 1 + 4Sum (n + 1) where now n=0,1,2,3,...L-2. n=0 This equation can be re-written, if we make these redefintions a+1 --> a and L --> L+1, as follow: n=L (L+1)^2 + (L)^2 = 1 + 4Sum n n=1 this means that: n=L Sum n = [(L+1)^2 + L^2 -1]/4 n=1 = L(L+1)/2 (a very well known result) ------------------------ | n=L | | Sum n = L(L+1)/2 | (3) | n=1 | ----------------------- Consider now the difference between eq.1 and eq.2. We need, here to considere the two cases of odd and even numbers separately. 1) L is odd (ie L-1 is even): n=L-2 i=L-3 L^2 - (L-1)^2 = 1 + Sum (4n + 4) - Sum (4i + 4), n=1 i=0 where n=1,3,...L-2 and i=0,2,4,...,L-3. n=L-2 = 1 + 4Sum [(n + 1) (-1)^(n+1)], n=0 where now n=0,1,2,3,...L-2. Redefing n+1 --> n gives n=L-1 = 1 + 4Sum [(n) (-1)^(n)] (n=1,2,3,...L-1). n=1 And redefining L --> L+1 provides (L becomes even!) n=L (L+1)^2 - L^2 = 1 + 4Sum [(n) (-1)^(n)] (n=1,2,3,...L) n=1 this is equavalent to n=L Sum [(n) (-1)^(n)] = [(l+1)^2 -L^2 -1]/4 = L/2 n=1 -------------------------------- | n=L | |Sum (-1)^n n = L/2, (L is even)| (4) | n=1 | -------------------------------- 2) L is even (ie L-1 is odd) n=L-2 i=L-3 L^2 - (L-1)^2 = Sum (4n + 4) - 1 - Sum (4i + 4), n=0 i=1 where n=0,2,...L-2 and i=1,3,5,...,L-3. n=L-2 = -1 + 4Sum [(n + 1) (-1)^(n)], n=0 where n=0,1,2,3,...L-2. Redefing n+1 --> n gives n=L-1 = -1 + 4Sum [(n) (-1)^(n+1)] (n=1,2,3,...L-1) n=1 and redefining L --> L+1 provides (L becomes odd!) n=L (L+1)^2 - L^2 = - 1 + 4Sum [(n) (-1)^(n+1)] (n=1,2,3,...L) n=1 this is equavalent to n=L Sum [(n) (-1)^(n+1)] = [(l+1)^2 -L^2 +1]/4 = L/2 n=1 ------------------------------------ | n=L | |Sum (-1)^n n = -(L+1)/2, (L is odd)| (5) | n=1 | ------------------------------------ 3 dimensions: ============ In this section, we will try to push the previous analysis to dimention 3, where we can construct cubes. we consider, as before, the two cases of odd and even cubes. 1) the odd cube case the smallest cube one could construct in this case is the unit cube (ie a cube where each edge is of unit lenght, 1 centimer for example). One can, next, construct a cube of edge equal to 3 by sticking others unit cubes. consider the more general case where we start from a given cube of edge L. The next cube to it, is necessarly of edge L+2. This can be done as follow: - in each of the six faces of the cube of edge L one can stck L^2 unit cubes. This makes 6L^2 unit cubes. - in each edge of the 12 edges one can stick L unit cubes. This makes 12L unit cubes - to each of the 8 corners one can attach one unit cube. this makes 8 unit cubes. The volume of the obtained cube (of edge L+2), constructed by adding a shell of unit cubes, is given by the volume of the cube we started from (ie the cube of edge L) plus the number of unit cubes in the shell: (L+2)^3 = L^3 + (6L^2 + 12L + 8). But one could construct the the cube of edge L from smaller and smaller cubes (just as we did the squares). Doing so, one obtains this relation: n=L-2 L^3 = 1 + Sum (6n^2 + 12n + 8) n=1 n=L-2 = 1 + Sum [6(n+1)^2 + 2] (6) n=1 where L is odd and n runs on odd numbers only (n=1,3,5,...,L-2). 2) the even cube case The smallest cube one could start from is a cube with an edge equal to two (in similarity with the sqaure case above). This cube contains 8 unit cubes. One can get, in the same maner as in odd number case, this relation: n=L-2 L^3 = Sum (6n^2 + 12n + 8) n=0 n=L-2 = Sum [6(n+1)^2 + 2] (7) n=0 where L is even and n runs on even numbers only (n=0,2,4,6,...,L-2). As in the two deimension case one can construct sum or alternate sum by adding or substracting equations (6) and (7). Consider first the addition and assume L odd (ie L-1 even), then n=L-2 i=L-3 L^3 + (L-1)^3 = 1 + Sum [6(n+1)^2 + 2] + Sum [6(i+1)^2 + 2] n=0 i=0 where n and i run odd and even numbers respectively (n=1,3,...L-2, i=0,2,4,...,L-3). This is the same as n=L-2 L^3 + (L-1)^3 = 1 + Sum [6(n+1)^2 + 2], n=0 where n=0,1,2,3,...,L-2. Redefinig n+1 --> n and L --> L+1 give n=L (L+1)^3 + L^3 = 1 + Sum [6(n)^2 + 2] n=1,2,3,...,L n=1 n=L knowing that Sum 2 = 2L, we deduce n=1 n=L Sum (n)^2 = [(l+1)^3 + L^3 - 2L - 1]/6 n=1 = [2(L)^3 +3(L)^2 + L]/6 ---------------------------- | n=L | |Sum n^2 = [2L^3 +3L^2 + L]/6| (8) | n=1 | ---------------------------- Consider now the substraction case. As in dimension 2 case, we need to consider the odd and even numbers cases separately. Takes first the odd numbers case: n=L-2 i=L-3 L^3 - (L-1)^3 = 1 + Sum [6(n+1)^2 + 2] - Sum [6(i+1)^2 + 2] n=1 i=0 where n and i run odd and even numbers respectively (n=1,3,...L-2, i=0,2,4,...,L-3). This can be re-written as n=L-2 L^3 - (L-1)^3 = 1 + Sum [6(n+1)^2 + 2](-1)^(n+1) n=0,1,2,3,...,L-2 n=0 n+1 --> n and L --> L+1 give (notice that L is now even!) n=L (L+1)^3 - L^3 = 1 + Sum [6(n)^2 + 2](-1)^(n) n=1,2,3,...,L. n=1 n=L It is easy to show that Sum 2(-1)^(n) = 0 (L is even), and then that n=1 n=L Sum [(-1)^(n) (n)^2] = [(l+1)^3 - L^3 - 1]/6 n=1 = L(L+1)/6 ---------------------------------------- | n=L | |Sum [(-1)^n n^2] = L(L+1)/2, L is even | (9) | n=1 | ---------------------------------------- it is also easy to show in the same way that in the case of L even one obtains -------------------------------------- | n=L | |Sum (-1)^n n^2 = -L(L+1)/2, L is odd | (10) | n=1 | -------------------------------------- So in all cases, we have ------------------------------------- | n=L | | Sum (-1)^n n^2 = (-1)^L L(L+1)/2 | (11) | n=1 | ------------------------------------- d dimensions: ============ we can generalise some of the previous results to an arbitrary dimention d. Consider constructing a hyper-cube (a cube in d dimensions) starting from a hyper-cube of edge L. This must be a hyper-cube of edge L+2. One can proceed as follow: - in each of the 2d faces (a d-1 hyper-surface) of the hyper-cube, one can stick L^(d-1) unit hyper-cubes. This gives 2d L^(d-1). - each of the 2d faces has 2(d-1) hyper-edge where L^(d-2) can be attached. But each edge is shared between two hyper-surface. This leads 2d 2(d-1)/2 L^(d-2) hyper-cubes. - we can say some thing similar on the hyper-edges. They contains hyper-corners of which each one is communs to 3 hyper-edges. One can find that 2d 2(d-1)/2 2(d-2)/3 L^(d-3) unit hper-cube can be added. -One could continue this until getting to the level of normal egde (containing only two corners), but each corner is shared between d edges. One can attach only one unit hyper-cube to such a corner and there are 2d 2(d-1)/2 2(d-2)/3 ... 2/d of them. Thus, a hyper-cube of edge L in d dimensions can be constructed from the smallest hyper-cube (that is the unit cube) by successevely adding shells of unit hyper-cubes. This is expressed by the following formulas: 1) L odd L^d = 1 + n=L-2 Sum [2d(n)^(d-1) + 2d 2(d-1)/2 (n)^(d-2) + ... n=1 + 2d 2(d-1)/2 2(d-2)/3 ... 2/d (n)^(0)] where where L is odd and n runs on odd numbers only (n=1,3,5,...,L-2). 2) L even n=L-2 L^d = Sum [2d(n)^(d-1) + 2d 2(d-1)/2 (n)^(d-2) + ... n=0 + 2d 2(d-1)/2 2(d-2)/3 ... 2/d (n)^(0)] where L is even and n runs on even numbers only (n=0,2,4,6,...,L-2). As an application of these previous formulas let's look at four and five dimensions: 4 dimensions: ============ If we put d=4 in the formulas above, we get for L odd n=L-2 L^4 = 1 + Sum (8n^3 + 24n^2 + 32n + 16) n=1 n=L-2 = 1 + Sum 8[(n+1)^3 + n + 1] (12) n=1 where n runs on odd numbers only (n=1,3,5,...,L-2). For L even we get n=L-2 L^4 = Sum 8[(n+1)^3 + n + 1] (13) n=0 where n runs on even numbers only (n=0,2,6,...,L-2) By taking the sum of equations (12) and (13) and making the redefinitions we did in the previous cases, we can find that: ------------------------------------- | n=L | | Sum n^3 = L^2(L+1)/4 | (14) | n=1 | ------------------------------------- By taking the difference of equations (12) and (13), one can find for L even --------------------------------------- | n=L | |Sum (-1)^n n^3 = L^2(2L+3)/4, L is even| (15) | n=1 | --------------------------------------- and for L odd ----------------------------------------------- | n=L | |Sum (-1)^n n^3 = -(2L^3 + 3L^2 - 1)/4, L is odd| (16) | n=1 | ----------------------------------------------- 5 dimensions: ============ -------------------------------------------- | n=L | |Sum n^4 = (L^5)/5 + (L^4)/2 + (L^3)/3 - L/30| (17) | n=1 | -------------------------------------------- ------------------------------------------ | n=L | |Sum (-1)^n n^4 = (-1)^L (L^4 + 2L^3 - L)/4| (18) | n=1 | ------------------------------------------ NB: In deriving eqs[15-18] one uses some of the formulas proved in the cases d=2 and d=3.