## Teaser 2975: Hollow cube land

**From The Sunday Times, 29th September 2019** [link]

I have a large box of toy building bricks. The bricks are all cubes (the same size), and can be pushed together then dismantled.

I decided to build the largest cube possible by leaving out all the interior bricks. When my hollow cube was finished I had two bricks left over. I put all the bricks back in the box and gave it to my two children. Each in turn was able to use every brick in the box to construct two hollow cubes, again with all interior bricks removed. Their cubes were all different sizes.

This would not have been possible had the box contained any fewer bricks.

How many bricks were in the box?

[teaser2975]

## Jim Randell 6:57 pm

on27 September 2019 Permalink |For

n ≥ 2we can calculate the “hollow cube” number as:We can than check for values where it is possible to make

h(n) + 2from the sum of two smallerh()numbers, in (at least) two different ways.This Python 3 program runs in 81ms.

Run:[ @repl.it ]Solution:There were 3754 bricks in the box.The setter was able to build a hollow cube measuring 26 units along each side, using up 3752 of the bricks (leaving 2 unused).

One child produced cubes measuring 8 and 25 units along each side, using up 296 + 3458 = 3754 bricks.

The other child produced cubes measuring 16 and 21 units along each side, using up 1352 + 2402 = 3754 bricks.

Analytically:

We are looking for numbers

p, qsuch that:So we can look for Pythagorean triples that share a hypotenuse. The smallest is:

from which we see the setter’s cube measured 26 units, and the children’s were (8, 25) units and (16, 21) units.

For more than 2 children the smallest solution is with 25354 bricks. The setter built a cube measuring 66 units, and there can be up to 4 children with cubes measuring (17, 64), (26, 61), (34, 57), (40, 53) units. Corresponding to:

LikeLike