Sum of cubic numbers, calculated in 4 dimensions
Recently I had an idea how to represent the 4th dimension. (Probably this is already well known, maybe I have also seen this somewhere before.) As the things you want to draw are normally restricted to a limited range, it is possible to use the $x$-axis a second time to represent the 4th dimension. If the 4-dimensional object is limited to the range [0, 1] in dimension 4, one just draws slices of the object at values 0, 0.25, 0.50, 0.75. That is sufficient, if the boundaries of the object vary in a linear way. (In a similar way one can also display 5 or 6 dimensional objects.)
A 4-dimensional cube would look the following way (Fig. 4). A 4-dimensional symmetric pyramid would look like this (Fig. 5). And a special case of an oblique 4d-pyramid looks like this (Fig. 6). This is an oblique pyramid, where the upper corner (in 4th dimension) is defined as $\begin{pmatrix} 0 \\ 0 \\ 0 \\ 1 \end{pmatrix}$.
The 4d “quasi-pyramid” which can be used to calculate the sum, looks this way (Fig. 7).
Analogously to the 3d-pyramid having 4 side-faces, which correspond to the 4 sides of a square, the 4d-pyramid has 6 side-volumes corresponding to the 6 faces of a cube. The little 4d-cubes inside the 4d-quasipyramid are cut only by those side-volumes of the 4d-pyramid, which do not include the point $\begin{pmatrix} 0 \\ 0 \\ 0 \\ 0 \end{pmatrix}$. There are 3 side-volumes, which include this point and 3 side-volume which don‘t. The ones which include the point are colored in red in Fig. 8 and the ones which do not in green. (The side-volumes extend in 4 dimensions, thus e.g. all four green-colored upper sides of the apparent four cubes in the figure belong to the same side-volume. Two red-colored side-volumes are not visible in the figure, also one green-colored one is hidden.)
Now, we paint the little cubes according to wether they are attached to one (blue), two (orange) or three (yellow) of the “green” side-volumes (Fig. 9).
The little 4d-cubes, corresponding to the blue-colored cubes are cut by a side-volume of the real pyramid into 2 equal parts. The orange-colored unit-4d-cubes are cut by 2 side-volumes such that 1/3 of a unit cube remains inside the real 4d-pyramid (to be proven). The yellow-colored cubes are cut by 3 side-volumes 3 times, such that inside the real pyramid only 1/4 of a unit cube remains, resembling the whole 4d-pyramid.
For the case $n=4$ the sum $S_3(4)=1^3+2^3+3^3+4^3$ can by approximated by $V_{pyr} = \frac{1}{4} base \cdot height = \frac{1}{4} 4^3 \cdot 4 = 64$
. In order to obtain the exact result, one has to add the
missing pieces. These are
$V_{blue} = 3 \cdot ( 3^2+2^2+1^2 ) \cdot \frac{1}{2} = 3 \cdot 14 \cdot \frac{1}{2} = 21$,
$V_{orange} = 3 \cdot ( 3+2+1 )\cdot\frac{2}{3} = 3 \cdot 6 \cdot \frac{2}{3} = 12$,
$V_{yellow} = 1 \cdot ( 1+1+1+1 )\cdot\frac{3}{4} = \frac{9}{4} = 3$,
In total one obtains
$S_3(4) = 64 + 21 + 12 + 3 = 100$.
This is the correct result, as
$1^3+2^3+3^3+4^3 = 1+8+27+64=100$.
We generalize this to the case of $n$ summands.
$V_{pyr} = \frac{1}{4} base \cdot height = \frac{1}{4} n^3 \cdot n = \frac{1}{4} n^4$,
$V_{blue} = 3 \cdot ( 1^2+2^2+3^2+...+[n-1]^2 ) \cdot \frac{1}{2}
= \frac{3}{2} \cdot (\frac{1}{3} ([n-1]^3) + \frac{1}{2} [n-1]^2 + \frac{1}{6} [n-1] ) = \frac{1}{2} [n^3-3n^2+3n-1] + \frac{3}{4} [n^2-2n+1] + \frac{1}{4} [n-1] = \frac{1}{2} n^3 - \frac{3}{4} n^2 +\frac{1}{4} n$,
$V_{orange} = 3 \cdot (1+2+3+...+[n-1]) \cdot \frac{2}{3} = 2 \cdot {[n-1] \cdot \frac{n}{2}}=n^2-n$,
$V_{yellow} = 1 \cdot n \cdot \frac{3}{4} = \frac{3}{4} n$.
They sum up to
$S_3(n) = \frac{1}{4} n^4 + (\frac{1}{2} n^3 - \frac{3}{4} n^2 + \frac{1}{4} n) + (n^2-n) + \frac{3}{4} n = \frac{1}{4} n^4 + \frac{1}{2} n^3 + \frac{1}{4} n^2$,
q.e.d.
(A more readable form of this proof can be downloaded here).