The goal is to find the smallest number (let's call it M) such that:
If M obeys property X, then the digit X is part of the number.
If M does not obey property X, then the digit X is NOT part of the number.
For example, if 2457 were a magic number, it would obey properties 2, 4, 5, 7 and not 0, 1, 3, 6, 8, 9. However we find that not to be the case, so it is not the number we are looking for.
Properties
0. One of the digits of M is the sum of the others.
1. Digits in decreasing sequence.
2. M has at least 2 odd digits.
3. All digits are different.
4. There is no subset in the digits with a sum of 4.
5. The number is not a palindrome.
6. The number does not contain 3 odd digits in a row.
7. M is a prime number.
8. M has at least 2 even digits in a row.
9. The product of all odd digits is a square number.