Header tag

Tuesday 28 April 2020

Summing Square Numbers and Triangle Numbers

"A grocer stacks apples in pyramids made of layers of equilateral triangles. How many apples will he need to fill four levels of apples?  A second grocer stacks apples in pyramids made up of layers of squares - how many apples will he need to fill four levels of apples in each tower?"

Firstly, let's borrow a picture for the first grocer's tower - this one contains the first five layers.


This is the series of triangle numbers:
The first row is one apple
The second row is three apples

The third row is six apples
The fourth row would be ten apples
Total = 1 + 3 + 6 + 10 =20 apples

And for the second tower, which is the series of square numbers:



The first row is just one apple.
The second row is four apples
The third row is nine apples (three squared)
And the fourth row would contain 16 apples (four squared).

1 + 4 + 9 + 16= 30 apples

These are the two ways of most densely packing spheres - in triangular fashion (left), or in a square fashion (right).  I've covered the density of sphere packing in hexagonal planes in a previous blog.

Extension Task

Now, to extend this simple problem a little further:  how many apples would be needed to produce a triangular tower (like the first grocer), or a square tower (like the second grocer) with n rows?

We need to determine expression for the nth term, and we can do this by taking differences between adjacent terms, and then the second (and if necessary) the third difference.

Triangular Tower (Tetrahedral)

The terms for the total numbers of apples are 1, 4, 10, 20, 35, 56 and so on.
The first difference is 1, 3, 6, 10, 15, 21 (the triangular numbers)
The second difference is 1, 2, 3, 4, 5, 6
And the third difference is 1, 1, 1, 1.

The third difference means that this is a cubic expression, and the value of the third difference (1) needs to be divided by 6 to give the coefficient a in the expression ax3 + bx2 + cx + d
Hence we know that the expression is x3/6 + bx2 + cx + d

We now have to subtract x3/6 from each of the xth value, and calculate the differences again (to determine what the coefficient b is), and then repeat the process to determine c.

Following this process, we can see that the expression for the nth term is

Tetrahedral Tower:  Tn = n3/6 + n2/2 + n/3


Square-based tower

The terms for the total numbers of apples are 1, 5, 14, 30, 55, 91 and so on.
The first difference is 1, 4, 9, 16, 25, 36 (the square numbers)
The second difference is 1, 3, 5, 7, 9, 11
And the third difference is 2, 2, 2, 2.

The third difference means that this is a cubic expression, and the value of the third difference (2) needs to be divided by 6 to give the coefficient a in the expression ax3 + bx2 + cx + d

Hence we know that the expression is x3/3 + bx2 + cx + d

We now have to subtract x3/3 from each of the xth value, and calculate the differences again (to determine what the coefficient b is), and then repeat the process to determine c, and d if needed.

Following this process, we can see that the expression for the xth (or the nth) expression is

Square-based Tower:  Tn = n3/3 + n2/2 + n/6

(As an aside, these solutions remind me of the puzzle I solved last year: 1/a + 1/b + 1/c = 1)

No comments:

Post a Comment