2
$\begingroup$

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)

  • 0
    First digit cannot be zero.2012-07-24

2 Answers 2

5

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.

1

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.