# # of even natural numbers less then or equal to $10^{10}$

How many natural numbers less than or equal to $10^{10}$ have at least one even digit in their decimal representation?

Is it $10^{10} - 5^{10}$ since there are 10^10 numbers overall and 5^10 odd numbers ? I think I am missing something, but I am not sure?

• The first digit can take one possible value ($1$)
• The next ten can take 5 possible values ($1, 3, 5, 7, 9$)
This gives $1\cdot5^{10}=5^{10}$ numbers with all digits odd. The original problem was the complement of this so calculating $10^{10}-5^{10}$ gives an answer of $5^{10}$.
Yes, it seems to be $10^{10}-5^{10}$... It appears there are $5^{10}$ with all odd..
• What about the number $7$? As a $10$-digit string it has lots of zeroes, so your counting would consider it to have at least one even digit ... – Noah Schweber Oct 29 '17 at 0:20