here is the question.

now I have tried to simplify the problem for my self by removing the last clause. In that case I believe that there will be 9!/5! such numbers (is that correct?).The number 916238457 is an example of a nine-digit number which

contains each of the digits 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. How many such numbers are there?

I am having difficult implementing the last clause to get a complete solution.

all help is appreciated. Thank you in advance.