**From New Scientist #2685, 6th December 2008** [link]

I threw a small number of standard dice and noted that the grand total of spots on the tops was a perfect square. Then I put the dice in a row in increasing order of their tops and wrote down the large number so formed (for example, 12224…).

Then I repeated the exercise with double the number of dice. Again the total number of spots was a perfect square, and again I wrote down the number formed by the tops in increasing order. It turned out that the second number I wrote down was the square of the first.

Incidentally (although you do not need to know this) throughout the exercise I threw at most one 6.

What was the second number that I wrote down?

[enigma1523]

### Like this:

Like Loading...

The following Python code runs in 100ms.

It checks for solutions up to a specified “small number” of dice. The default is 10, but you can specify a different number on the command line. If you want to find only the first solution you can add a call to [[

`sys.exit()`

]] at the end of the [[`check()`

]] function.Solution:The second number is 1111111155555556.