**From New Scientist #2619, 1st September 2007**

Look how the word ‘Imagine’ can be transformed into ‘Enigma’:

I M A G I N E

Delete the first:

M A G I N E

Reverse the next two:

A M G I N E

Reverse completely:

E N I G M A

Your task is to start with a particular seven-figure number, carry out those three operations on its digits and end up with a six-figure number that is precisely one-third of the number that you started with.

What is that seven-figure number?

[enigma1458]

### Like this:

Like Loading...

*Related*

This brute force approach in Python runs in 141ms (under PyPy).

Solution:The seven-figure number is 2939979.Considered as an addition sum, we get a slightly longer, but much faster program. This version runs in 37ms.

Can the seven-digit number be 3996999 ?

No. 3996999 ÷ 3 = 1332333, which is a 7 figure number (not a 6 figure number). The result of operations on 3996999 is 999699 (a 6 figure number), and the two are clearly not equal.