How many even numbers less than $500$ can be formed using the digits $1$, $2$, $3$, $4$ and $5$?
Each digit may be used only once in any number.
I first tried by using the formula for permutations:
$$
3P1 \times 6 = 18
$$
But the answer is $28$.
So I tried again, this time by listing all of the possible permutations:
- $132$
- $142$
- $152$
- $124$
- $134$
- $154$
- $214$
- $234$
- $254$
- $312$
- $342$
- $352$
- $314$
- $324$
- $354$
- $412$
- $432$
- $452$
I still get $18$.
What am I doing wrong?
Best Answer
Case $1$: The number is a single digit.
In this case, the only even numbers are $2$ and $4$, giving a total of $2$.
Case $2$: The number has exactly two digits.
In this case, the last digit must be either $2$ or $4$, and the first digit must be one of the other four digits allowed, giving a total of $2 \cdot 4=8$.
Case $3$: The number has exactly three digits.
In this case, the last digit must be either $2$ or $4$ and the middle digit must be one of the other four digits allowed.
If the middle digit is $5$, then the first digit must be one of the other three digits allowed, giving a total of $2 \cdot 3=6$.
If the middle digit is not $5$, then the first digit must be one of two digits other than the last two digits and $5$, giving a total of $2 \cdot 3 \cdot 2=12$.
So, there are $2+8+6+12=28$ even numbers less than $500$ with distinct digits $\in \{1,2,3,4,5\}$.