**From New Scientist #2859, 7th April 2012** [link]

Clever logic should enable you to find the nine-figure number that I have in mind. It consists of the digits 1 to 9 in some order, and in the number each digit is next to another that differs from it by one.

In just one case a digit has both neighbours differing from it by one. Furthermore, the solution is exactly divisible by more than three-quarters of the numbers 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 and 12.

What is the nine-figure number?

[enigma1692]

### Like this:

Like Loading...

*Related*

Here’s my initial solution in Python. It runs in 316ms.

Solution:The number is 436578912.Here’s a faster program that uses recursion. It runs in 54ms.