Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How many 3-digit positive integers are odd and do not contain the digit 5 ?

My attempt: 100-999 3 -digit integers, 900/2=450 odd numbers. Now how to calculate odd numbers which do not contain digit 5 in it.

share|cite|improve this question
Hint: An odd integer, expressed in decimal notation, must have an odd digit $1,3,5,7,9$ in the rightmost ("ones") place. – Dilip Sarwate Sep 10 '12 at 11:06
it says should not contain digit 5, and that implies not only for the ones place but for ones, tens and hundred place. isnt it? – pradip Sep 10 '12 at 11:08
Yes, but I did not provide an answer to your question or address the details on it. I just gave a hint that might help you in working out the answer for yourself. – Dilip Sarwate Sep 10 '12 at 11:11
up vote 2 down vote accepted

Units digit should contain {1,3,7,9} = 4; Tens digits can be {0,1,2,3,4,6,7,8,9} = 9 Hundreds digit can be {1,2,3,4,6,7,8,9} = 8.

So the answer is 8$*$9$*$4 = 288

share|cite|improve this answer

The important aspect in these kinds of permutations and combinations questioins is the direction with which you are approaching the problem.

For some questions, starting from the left most digit and then moving towards right may be a good strategy. Ex-- How many numbers are greater than 500 or less than 800 kind of questions, where hundred's digit has a lot of importance.

But for these kind of questions, where units digit is important, it is a better idea to start from the right-most digit.

Note: When repetition is not allowed, the above two strategies play an important role.

As repetition is allowed in this problem, it is a straight forward one.

First units digit : odd-1,3,5,7,9 No five : 4 possibilities

Middle digit : all 10 values No five : 9 possibilities

Hundred's digit : zero not possible- 9 values 8 possibilities

Total = 4 * 9 * 8 = 288

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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