# How many different 3-digit numbers can be formed if the number can consist of the digits from 0 to 7, cannot start with 0 and must be even?

Original question:

A 3-digit number is made up using the digits 0, 1, 2, 3, 4, 5, 6 and 7 at most once each. The number cannot start with 0. How many different numbers can be formed if the number must be even?

Approach:

Working backwards, there are four possibilities for the final digit since the final digit must, for the number to end up even, be 0, 2, 4 or 6. There are seven possibilities for the penultimate digit since there are eight digits that can be used but one of them has been used up on the final digit (because no digit can be repeated within a number). There are five possibilities for the first digit because two digits have already been used up and zero is invalidated due to the question's stipulation that the number cannot start with zero (which would have been pretty self-explanatory anyway).

4 x 7 x 5 = 140 different numbers which can be formed.

However, the textbook says that 150 different numbers can be formed. Where have I gone wrong?

• Zero may have been used up before you come to the first digit. Commented Jul 29, 2016 at 3:44
• Incidentally this is an extremely badly worded question. It is not possible to have a 3-digit number consisting of the digits between 0 and 7, because any number consisting of those digits has to be 8 digits long. "Consisting of some of the digits" yields the question you are answering. "Consisting of digits" (no "the") would allow digits to be repeated. You will find this too often in textbooks: having to look at the answer to see what the author thought the question meant. Commented Jul 29, 2016 at 5:25
• I agree. Likewise in tests and exams, except therein one cannot check the answers! @MartinKochanski Commented Aug 5, 2016 at 1:37

Suppose for example that you choose

last digit $4$, second-last digit $0$.

Then there are $6$ possible choices for the first digit, not $5$ as you claimed.

To solve the problem it's probably best to split into two cases:

• if the last digit is zero then there are $7$ possibilities for the first digit and $6$ for the second, total $42$;
• if the last digit is not zero then there are $3$ choices for the last digit, $6$ for the first and $6$ for the secong, total $108$.

Final total, $150$.

• I did come across both outcomes in my working out, but I didn't realize that I needed to consider both. Interesting! @David Commented Jul 29, 2016 at 5:15

There are various ways to deal with it. Choosing in the order first-last-middle,
you could have $E-E\;or\;O-E,\;$yielding $\;3\cdot3\cdot6 + 4\cdot4\cdot6 = 150$

Choose any method you are comfortable with , but remember this:
many such problems become easier by changing the order in which you choose the digits

Split it into disjoint cases, and then add them up:

• The amount of numbers that end with $0$, which is $7\cdot6=42$
• The amount of numbers that end with $2$, which is $6\cdot6=36$
• The amount of numbers that end with $4$, which is $6\cdot6=36$
• The amount of numbers that end with $6$, which is $6\cdot6=36$