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

For the following question:

How many four-digit numbers can you form with the digits $1,2,3,4,5,6$ and $7$ if no digit is repeated?

So, I did $P(7,4) = 840$ which is correct but then the question asks, how many of those numbers are odd and how many of them are even. The answer for odd is $480$ and even is $360$ but I have no clue as to how they arrived to that answer. Can someone please explain the process?


share|cite|improve this question
Hint: your number is odd or even is determined by its last digit. – Secret Math Jun 15 '13 at 20:12
I will make a comment that may not be understood. It is not a really good idea to think of the total number as $P(7,4)$. It is better, I think, to say to yourself the first digit can be chosen in $7$ ways, and for each such choice the second can be chosen in $6$ ways and $\dots$, so the number is $(7)(6)(5)(4)$. This will keep you closer to the ground, and help with the next problem. The last digit can be chosen in $3$ ways. For each such choice $\dots$. – André Nicolas Jun 15 '13 at 20:19
up vote 1 down vote accepted

We first count the number of ways to produce an even number. The last digit can be any of $2$, $4$, or $6$. So the last digit can be chosen in $3$ ways.

For each such choice, the first digit can be chosen in $6$ ways. So there are $(3)(6)$ ways to choose the last digit, and then the first.

For each of these $(3)(6)$ ways, there are $5$ ways to choose the second digit. So there are $(3)(6)(5)$ ways to choose the last, then the first, then the second.

Finally, for each of these $(3)(6)(5)$ ways, there are $4$ ways to choose the third digit, for a total of $(3)(6)(5)(4)$.

Similar reasoning shows that there are $(4)(6)(5)(4)$ odd numbers. Or else we can subtract the number of evens from $840$ to get the number of odds.

Another way: (that I like less). There are $3$ ways to choose the last digit. Once we have chosen this, there are $6$ digits left. We must choose a $3$-digit number, with all digits distinct and chosen from these $6$, to put in front of the chosen last digit. This can be done in $P(6,3)$ ways, for a total of $(3)P(6,3)$.

share|cite|improve this answer
Why can we only pick $6$ digits and not $7$? – Jeel Shah Jun 15 '13 at 20:36
Because we have already used one up when we chose the last digit. – André Nicolas Jun 15 '13 at 20:36
I'm sorry, I still don't understand. Combinatronics just doesn't make a lot of sense to me. Can you show some graphic or add some more detail to your answer please? – Jeel Shah Jun 15 '13 at 20:40
For a graphic, you will have to draw it. Let's count the evens. Draw a tree. We first choose the last digit. We can choose $2$, $4$, or $6$. Now let's trace what can happen if we choose $2$ as the last digit. The first can be any of $1,3,4,5,6,7$, a total of $6$ choices, so $6$ branches coming out of "last digit $2$. Continue. – André Nicolas Jun 15 '13 at 20:45
Probably. It is a lot easier (at least for me) to make a programming error than a thinking error. – André Nicolas Jun 15 '13 at 20:56

Multiply the answer by $\frac{4}{7}$ since there are 4 odd numbers and $\frac{3}{7}$.

share|cite|improve this answer

Only the last digit has to be even digit for the number to be even. As there are $3$ even numbers in the list so the last digit can be chosen in $3$ ways. The remaining digits has to be chosen from the remaining $6$ numbers(as one (even) number has already been chosen) in ${6 \choose 3}$ ways and can be permuted among them in $3!$ ways. So the total no. of even numbers equal $3{6 \choose 3}3!$

And the no. of odd numbers =$840-3{6 \choose 3}3!$

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.