## Teaser 2953: Marble tower

**From The Sunday Times, 28th April 2019** [link]

Liam has a number of bags of marbles; each bag contains the same number (more than 1) of equal-size marbles.

He is building a tetrahedron with the marbles, starting with a layer which fits snugly in a snooker triangle. Each subsequent triangular layer has one fewer marble along each edge. With just one bag left he had completed a whole number of layers; the number of marbles along the edge of the triangle in the last completed layer was equal to the number of completed layers. The last bag had enough marbles to just complete the next layer.

How many bags of marbles did Liam have?

[teaser2953]

## Jim Randell 8:24 am

on26 April 2019 Permalink |This Python program runs in 85ms.

Run:[ @repl.it ]Solution:There were 20 bags of marbles.We can simplify the equation:

to:

For integer

xthe first two terms give us a whole number of thirds, so the2/xterm must also provide a whole number of thirds, i.e.x= 1, 2, 3, or 6.And the only values to give an integer value for

nare:There are

T(x)marbles in each of thenbags, and this is more than 1, so this eliminates the first solution leaving, T(6) = 21 marbles in each of the 20 bags.Here’s a Python program that uses the analysis:

LikeLike