Find a ten-digit number with the following two properties (in base 10, of course): A. The number contains each digit (from 0 to 9) exactly once. B. For every N from 1 to 10, the first N digits of the number are divisible by N.

Thus, for instance, 1234567890 doesn’t work; while 1 is divisible by 1, 12 is divisible by 2, and 123 is divisible by 3, 1234 isn’t divisible by 4.

No fair Googling, or writing a program that just checks millions of possible numbers. The best solution I could find narrowed down the field to 10 numbers; I then had to check something (I won’t say what) for each one, so I suppose that’s a bit brute force, but not much. If you have a more elegant solution, let me know.

Thanks to Cordell Haynes for passing this along.