Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

How many 5-digit numbers can be created based on the following conditions:

Starting from the left, the first digit is even and nonzero, the second is odd, the third is an odd prime and the fourth and fifth are two random digits not used before in the number?

Note: First digit cannot be a $0$ (Zero)

share|improve this question
    
Did you try to draw a counting tree? Do you allow a 0 for the first digit? –  ncmathsadist Jul 24 '12 at 18:40
    
First digit cannot be zero. –  Sumit Bhowmick Jul 24 '12 at 18:45

2 Answers 2

up vote 5 down vote accepted

The first digit is even, and since the number must be a 5-digit number we have 4 choices, namely 2,4,6,8. The second digit is odd, so there are 5 choices, 1,3,5,7,9. For the third digit, it must be 3, 5, or 7.

For the final two digits, the number of choices will depend on how many distinct digits we used for the first three. The only possible overlap is if the second and third digits are the same, so we'll treat that case separately.

If they are different, there are 4 choices for the second digit, since it can't be the same as the third digit. Then we have 7 remaining digits, from which we need to pick 2. There are 7*6=42 possible choices, so multiplying this with 4*4*3=48 gives 2016. I am assuming here that the fourth and fifth digits must be distinct, which seems reasonable given the wording.

In the case that the second and third digits are the same, we have only one choice for the second digit (it must equal whatever we pick for the third), and still 3 choices for the third. In this case there are 8 choices to pick 2 digits from, so there are 8*7=56 choices. Multiplying by the 4*1*3=12 choices for the first three digits gives 672 possibilities.

Adding these together, we have 2688 5-digit numbers with all of these properties.

share|improve this answer

if second digit is 1 or 9 , we have 4*2*3*7*6=1008 choices. if second digit is not equel to third digit we have 4*3*2*7*6=1008 choices. if second digit is equel to third digit we have 4*3*1*8*7=672 choices. then we have finaly 2688 choices.

share|improve this answer

Your Answer

 
discard

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.