How many integers from 1 through 9999, inclusive, do not contain any of the digits 2, 3, 4 or 5?
OK. This is my understanding of this:
You cannot use 2, 3, 4, 5 in any number. Therefore you are restricted to: 1,0, 6, 7, 8, 9.
Since repeats are allowed, we then can have: 6^4 - 6^3 =1,080 - 4-digit numbers.
Then we can have: 6^3 - 6^2 =180 - 3-digit numbers.
Then we can have: 6^2 - 6^1 =30 - 2-digit numbers
Finally, we can have: 6^1 - 6^0 =5 - 1-digit numbers. So, in total, we should have:
1,080 + 180 + 30 + 5 =1,295 numbers that have no 2, 3, 4, 5 in them.
Note: The reason for the subtractions is that no number is allowed to begin with "0".