Nine digit positive integers of the form PQRSTUVWX are called four-six numbers if the digits P, Q, R and S (in this order) are in strictly ascending order of magnitude, while the digits S, T, U, V, W and X (in this order) are in strictly descending order of magnitude.

For example, each of 567876543 and 678986430 is a four-six number, but 567876654 is NOT a valid four-six number since the digits 876654 (in this order) are not in strictly descending order of magnitude. Similarly, 678875432 is NOT a valid four-six number since the digits 6788 (in this order) are not in strictly ascending order of magnitude.

All the possible four-six numbers are now arranged in descending order of magnitude.

What is the 4664^{th} number?

__Note__: No four-six number can contain leading zeroes.

(Before looking at previous postings) Generate the 9500 "four-six numbers": vary p from 1 by 1 until p > 6 vary q from p+1 by 1 until q > 7 vary r from q+1 by 1 until r > 8 vary s from r+1 by 1 until s > 9 vary t from s-1 by -1 until t < 4 vary u from t-1 by -1 until u < 3 vary v from u-1 by -1 until v < 2 vary w from v-1 by -1 until w < 1 vary x from w-1 by -1 until x < 0 Sort these in descending order (678987654 to 123543210) The 4664th is 245986541 (I'll post, then look at other comments.)l