### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,367)
- misc (4)
- project euler (2)
- puzzle (90)
- puzzle# (48)
- site news (58)
- tantalizer (94)
- teaser (7)

### Site Stats

- 233,130 hits

Programming Enigma Puzzles

27 December 2019

Posted by on **From New Scientist #2133, 9th May 1998** [link]

The ABC brick company prides itself on making unique toys. It has just produced a range of wooden bricks, all of the same size, in the shape of a tetrahedron (a solid with four equilateral-triangle faces). Each of the four faces on every tetrahedron is painted in one of the company’s standard colour range. For example, one of the bricks has one yellow face, two blue faces, and a green face. The company ensures that each tetrahedron is different — there is no way of rotating one to make it look like another. With that restriction in mind, the company has manufactured the largest possible number of these bricks.

To add to the uniqueness of the toys, each brick is placed in an individual cardboard box with the letters “ABC” stencilled on it. Then using the same standard range of the company’s colours, an artist paints each of the letters on the boxes. For example, one has a red “A”, a blue “B”, and a red “C”. No two of the colourings of the ABCs are the same, and, with that restriction in mind, once again the company has produced the largest possible number of boxes.

By coincidence, there are just enough boxes to put one of the tetrahedra in each.

How many colours are there in the company’s standard range?

There are now 450 *Enigma* puzzles remaining to post, which means that 75% of all *Enigma* puzzles are now available on the site.

[enigma978]

%d bloggers like this:

If there are

ncolours available to colour the three letters ABC, then there aren³different colourings.This Python program counts the number of distinguishable ways to colour a tetrahedron with

ncolours, and looks for the first instance (wheren ≥ 3) of this number being equal ton³.It runs in 695ms.

Run:[ @repl.it ]Solution:There are 11 colours in the company’s standard range.Analytically:

The number of distinguishable ways to colour a tetrahedron with

ncolours is given by:which is the number of ways to colour the tetrahedron using exactly 1, 2, 3, 4 (of

n) colours.Which can be written as:

(see: OEIS A006008).

We are interested in when:

So:

Which has roots at

n = 0, n = 1, n = 11.We are told there are at least 3 colours, so we want the largest of these solutions.