Saturday, September 08, 2007

Enigma 1459

Here is how Mathematica can be used to solve New Scientist Enigma number 1459 in the 8 September 2007 issue.

This is a straightforward digit manipulation problem which can easily and quickly be solved by a brute force search. In this problem there is no point in trying to do any clever programming.

Initialise the counter.
n=1;

Step the counter until the condition on its digits is satisfied.
While[Not[MemberQ[Map[FromDigits, Permutations[IntegerDigits[n]]], 12n/11]], n++]

Display the counter value that satisfies the condition.
n
1683

No comments: