The number 916238457 is an example of nine digit number which contains each of the digit 1 to 9 exactly once. It also has the property that the digits 1 to 5 occur in their natural order, while the digits 1 to 6 do not. Number of such numbers are
2520
The conditions are:
1. The digits from 1 to 5 should be in their natural order.
2. The digit 6 should be placed such that the digits 1 to 6 DO NOT occur in their natural order.
3. The other digits: 7, 8 and 9 are placed in other places.
We only have one way of doing step 1. We have 5 digits and 6 spaces like this:
_1_2_3_4_5_
In doing step 2, we can place the digit 6 in any of the first 5 spaces. Thus we have 5 ways of doing step 2.
Similarly, in doing step 3, we have 7, 8 and 9 ways of placing the digits 7, 8 and 9 respectively.
So, there are 1×5×7×8×9=2520 numbers that satisfy the given conditions.