-2
$\begingroup$

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?

$\endgroup$
0
$\begingroup$

Notice that the complement of what we are trying to find is the number of natural numbers containing only odd numbers. This is significantly easier to find.

To make all the digits odd:

  • 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}$.

$\endgroup$
-2
$\begingroup$

Yes, it seems to be $10^{10}-5^{10} $... It appears there are $5^{10} $ with all odd..

$\endgroup$
  • 1
    $\begingroup$ 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 ... $\endgroup$ – Noah Schweber Oct 29 '17 at 0:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.