### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,270)
- misc (3)
- project euler (2)
- puzzle (67)
- site news (50)
- tantalizer (69)
- teaser (7)

### Site Stats

- 206,369 hits

Programming Enigma Puzzles

26 March 2018

Posted by on **From New Scientist #2225, 12th February 2000** [link]

I have a cube. On each of its faces is a digit, the style of writing being rather like the display on a calculator. I hold the cube to look at one of its faces from the front and then, keeping the upper and lower faces horizontal, I swivel the cube around and note the digits which I see (all seemingly the right way up) and hence I read off a four-figure number which is divisible by eleven.

Now I repeat the process starting this time looking from the front at one of the faces which was horizontal in the previous manoeuvre. Once again I read off a four-figure number which is divisible by eleven.

Now I start again with the cube in exactly the same position as it was at the start of the first process. This time I keep the left-hand and right-hand faces vertical and I swivel the cube around. Once again I read a four-figure number which is divisible by eleven and also by three odd integers less than eleven.

What was that last four figure number?

[enigma1069]

%d bloggers like this:

(See also:

Enigma 362).There are many possibilities for the exact sequence of moves used in the puzzle, this code tries them all, and finds several solutions, but the third number (and the first number) are the same in all instances. There are two layouts of the cube which mirror each other.

This Python code runs in 765ms.

Run:[ @repl.it ]Solution:The third four digit number is 9625.9625 is a multiple of 1, 5, 7, and 11.

The first number is 9020, and the second number is 5060 or 6050 (depending on the exact sequence of moves used, and the layout of the cube).

The cube has a “6/9” pattern on the front (initially reading as a 9) and “2” pattern on the back. The up and down face have a “6/9” and “5” pattern on. And the left and right faces both have a “0” pattern on.

The puzzle relies on the fact that the “0” pattern can be interpreted as a 0 digit in any quarter-turn orientation (not just upright and upside-down) – the puzzle says the digits are “rather like” 7-segment digits on a calculator, so we can suppose they are somewhat squarer. If you modify the declaration for the pattern “0” at line 10 to only represent 0 in 0- and 2- quarter turns you will find there are no solutions.

Reading the first and third numbers provide enough information to fully describe all faces of the cube.