0

I'm trying to calculate the volume of a pyramid that is made from a descending number of cubes per layer

for example:

the bottom layer is 4x4, the second layer is 3x3, the third layer is 2x2, and so on

one boundary I am facing is that I only know one size of one side, although the height of the pyramid (number of layers) is equal to the size that I know.

I tried using the pyramid equation although this did not give the same answers to manually counting (also the answers weren't integer as I would expect)

another way to base this problem is that I want to find the sum of numbers up to n, but then add the sum of numbers up to n-1 then so on and so fourth

1 Answers1

1

What you have is the sum of squares $$S=\sum \limits_{i=1}^n i^2=\frac{n(n+1)(2n+1)}{6} $$

Vasili
  • 10,690