QUESTION: How many seven digit numbers are there when 0, 5, 4 cannot be the leading number?
if a seven-digit number has a leading zero, then it is, in effect, a six-digit number.
So ,the question really is:
How many seven digit numbers are there when 5 and 4 cannot be the leading digit?
if 5 and 4 are excluded as the leading digit then there are 7 other ways of selecting a digit as the leading digit.
(there are 10 digits in total but zero is excluded since it is the leading digit that is being considered, hence only 9 left, and only 7 left after 5 and 4 have been removed)
There are now 6 digits remaining to be filled in and there are of course 10^6 variations in that selection.
Therefore total number of selection is 7*10^6