How To Really Solve This Packing Spheres Puzzle? - An illustration showing a triangular structure of circles. The base has 5 circles, the next layer up has 4 circles, the next layer - 3, the next layer - 2, and the final layer - 1. The total number of circles adds up to 15.

Packing spheres is a classic geometry problem that has practical relevance as well as mathematical significance. In this essay, we will start by looking at a few interesting mathematical properties of this activity. To do this, we will start with 2-dimensional models and then extend the concepts to 3-dimensional models.

Then, we will look at a simple, yet intriguing puzzle based on the concepts we will have covered by then. I hope you are game. Let’s go!

This essay is supported by Generatebg

A product with a beautiful background featuring the sponsor: Generatebg - a service that generates high-resolution backgrounds in just one click. The description says "No more costly photographers" and displays a "Get Started" button beneath the description.

Figurate Numbers — The Starting Point to Packing Spheres

Let us start with the 2-dimensional version of packing spheres — stacking circles. There are several ways of stacking circles on top of each other. Two of these are of interest to us in the context of this essay.

First, you could stack circles in such manner that they form a triangular structure. For example, you could start with 5 circles at the base, add four on top of this layer, then three on top of that, and so on to arrive at the structure that you see below.

How To Really Solve This Packing Spheres Puzzle? — An illustration of triangular numbers showing a triangular structure of circles. The base has 5 circles, the next layer up has 4 circles, the next layer — 3, the next layer — 2, and the final layer — 1. The total number of circles adds up to 15. Here, 15 is a triangular number.
Illustration created by the author

As you can see, if you count the total number of circles in this structure, it adds up to 15. Any number (starting from 1) of such circles that enables a triangular structure is known as a triangular number. It is fairly straightforward to see that we triangular numbers are nothing but the sum of n integers where n >= 1.

Another way of stacking circles is to form a square structure. You get no prize for figuring out that square numbers are, well, squares. Below, you can see an example of square with 5 circles per side, summing up to 25 circles in total.

How To Really Solve This Packing Spheres Puzzle? — An illustration of square numbers showing a square structure of circles. There are 5 circles per side that form a square that has a total of 25 circles. Here, 25 is a square number. The illustration also shows using L-shaped signs that square numbers are formed by summing consecutive odd numbers.
Illustration created by the author

Here, you can see that square numbers are created by adding consecutive odd numbers. Triangular numbers and square numbers belong to a bigger pot of numbers called figurate numbers. That’s interesting, but what more can we get out of these structures?


An Interesting Property of Triangular Numbers and Square Numbers

One property that is not so apparent is the fact that the square numbers and triangular numbers are related. In my essay on how to make working with squares fun in math, I covered the fact that any odd number is the difference between consecutive squares. Closely related to that fact is the property that every square number is the sum of consecutive triangular numbers.

Here is a graphical illustration of this property:

How To Really Solve This Packing Spheres Puzzle? — The same square circle structure with 25 circles in total is shown. This time, two triangles are formed by connecting the centres of circles at the boundaries. One triangle has 10 circles and the other has 15 circles. Thus, the illustration shows that every square number is the sum of two consecutive triangular numbers.
Illustration created by the author

Now that we have covered the 2-dimensional world of stacking circles, let us move on to the 3-dimensional world of packing spheres.

The 3-Dimensional World of Packing Spheres

When we extend the concept of a triangular number stack to 3-dimensions, we arrive at a 3-d pyramid that has an equilateral triangle as its base and spheres in place of circles. Such a pyramidal structure is known as a tetrahedron.

Consequently, the numbers that enable us to form such tetrahedrons are known as tetrahedral numbers. We arrive at these numbers by using the following formula:

(1/6)*n*(n+1)*(n+2)

Similarly, imagine a four-sided pyramid with a square base and equilateral triangles as sides. Such a square tetrahedral pyramid is the sphere-analogue of a square pack of circles. We arrive at numbers (of spheres) that enable us to construct square tetrahedral pyramids using the following formula:

(1/6)*n*(n+1)*(2n+1)

Now that we are ready to pack spheres in 3-dimensions, let us jump into the puzzle.


The Packing Spheres Puzzle — Revealed

Say that a child is packing spherical marbles in the form of a tetrahedral pyramid with an equilateral triangle as the base. First, the child constructs two such pyramids. Next, the child combines the marbles from the two pyramids to form a bigger tetrahedral pyramid that also has an equilateral triangle as its base.

What is the minimum number of spherical marbles that enable the child to accomplish such a packing sequence?

Try to solve this puzzle for two cases:

1. Both the smaller tetrahedral pyramids are of the same size.

2. The smaller tetrahedral pyramids are of different sizes.

Spoiler Alert:

If you wish to solve this puzzle on your own, I suggest that you tune off of this essay for now. After your attempt, you may continue reading this essay from this point. Beyond this section, I will be explicitly discussing the solutions to the puzzle.


The Solutions to the Packing Spheres Puzzle

The first thing to note is that you could take advantage of the formula for a tetrahedral pyramid with an equilateral triangle base. Just as a reminder, the formula is as follows:

(1/6)*n*(n+1)*(n+2)

Now, if you plug in values for n from 1 upwards, you will get the following sequence:

1, 4, 10, 20, 35, 56, …

In order to solve the puzzle for the case when both smaller pyramids are identical, we just have to ask the following question:

Which smallest number in the sequence from above results in another number in the sequence when it is added to itself?

The answer is pretty straightforward: you can add 10 to itself to get to 20. So, for identical pyramids, the child will need at least 20 marbles.

For the case when the smaller pyramids are of different sizes, the solution is not so straightforward. I wanted to solve the puzzle as fast as possible. So, I did not end up coming up with a clean mathematical solution. Instead, I just came up with an algorithmic solution.

The algorithm answers the following question:

Which is the smallest number in the sequence that is the sum of any two previous non-identical numbers in the sequence?

The execution of such an algorithm would involve trial and error or a loop to arrive at the solution. For non-identical pyramids, the child would need at least 680 marbles, from which the smaller pyramids would use 560 and 120 marbles respectively.

I hope you had fun solving this puzzle. If you came up with better or more intriguing approaches to solve it, do us all a favour and share them in the comments!


Reference and credit: Martin Gardner.

If you’d like to get notified when interesting content gets published here, consider subscribing.

Further reading that might interest you: The Helix Puzzle — A Simple Geometric Challenge and How To Casually Guess Numbers After Dice Throws?

If you would like to support me as an author, consider contributing on Patreon.

Street Science

Explore humanity's most curious questions!

Sign up to receive more of our awesome content in your inbox!

Select your update frequency:

We don’t spam! Read our privacy policy for more info.