How many integers not using the number 4 in any digit at all are there in the integers from 1 to 5999?
Answer
There are five numbers of 0, 1, 2, 3 and 5 not using 4 in thousands digit.
Both in tens and ones digit there are also nine numbers counted as same as hundreds digit.
However, since the number 3645 includes 0000, numbers should be found is 3645 - 1 = 3644.
3644
Solution
The integers from 1 to 5999 are considered to be the number of 4 digits like 5 = 0005, 55 = 0055, and 555 = 0555 for example, and the number of the integer not using 4 in any digit is counted in the integers from 0001 to 5999.
There are five numbers of 0, 1, 2, 3 and 5 not using 4 in thousands digit.
There are nine numbers from the number of 0 to 9 excluding 4 in hundreds digit.
Both in tens and ones digit there are also nine numbers counted as same as hundreds digit.
The total numbers can be counted as 5 × 9 × 9 × 9 = 3645.
However, since the number 3645 includes 0000, numbers should be found is 3645 - 1 = 3644.