You can build on the above and reduce the upper bound further:
7*9! = 2,540,160
which means the first digit cannot be higher than 2.
and all solutions where the first digit is 2 are invalid:
2! + 6*9! < 2,999,999
2! + 5*9! + 8! < 2,000,000
Therefore you can reduce the upper bound now to 1,999,999, as:
1! + 6*9! = 2,177,281 (which
is >= 1,999,999)
Juk