How Many 4-Digit Positive Even Numbers Use Only Digits 0 Through 4, With No Digits Repeating?

The answer can be written as

$$1\cdot4\cdot3\cdot2+2\cdot3\cdot3\cdot2$$

The idea is to split the count into two cases, according to whether the ones digit (which makes the number even) is $0$ or not. There's only one way to choose $0$, after which the remaining digits can be chosen in $4\cdot3\cdot2$ ways. There are two ways to choose nonzero ones digit (either $2$ or $4$), but that means there are only three choices for the lead digit, since you have to avoid the $0$. But after that, the two interior digits can be chosen in $3\cdot2$ ways.

Added later: The heart of this solution is the calculation of $1\cdot4+2\cdot3$, which amounts to counting the number of two-digit even numbers out of the digits $0$ to $4$; the remaining $3\cdot2$ is routine. I was bemused by the observation that $1\cdot4+2\cdot3=10={5\choose2}$, where the latter counts the number of (unordered) choices of $2$ of the $5$ digits, and wondered if this could be attributed to anything more than numerical coincidence (aka, Richard Guy's Strong Law of Small Numbers). It turns out it can:

Note that each odd digit can be paired with a distinct nonzero even digit, e.g., $1$ with $2$ and $3$ with $4$. Now pick any pair of digits, which can be done in $5\choose2$ ways. If one of the chosen digits is $0$, put it in the ones digit and use the other as the lead digit. If both are even but neither is $0$, put the smaller in the ones digit and use the larger as the lead digit. If both are odd, replace each one with the even digit it's been paired with and then put the larger of these in the ones digit and use the smaller as the lead digit.

This works as long as each odd digit can be paired with a nonzero even digit, i.e., if the set of available digits consists of $0$, $k$ odd digits, and $k$ nonzero even digits, giving a count of $2k+1\choose2$ two-digit even numbers. (It also works without the $0$, the count being simply $2k\choose2$ in that case.)


You can choose one's place in $3$ ways $(0, 2, 4)$.

Once you do that, you now have $4$ digits left for the second place (ten's), $3$ for the third (hundred) and $2$ for the $4$th (thousand).

That gives you $3 \times 4 \times 3 \times 2 = 72 \ $ numbers.

But this also counts numbers that have $0$ in thousand place. We need to remove them as they are not $4$ digit numbers really.

So if I fix $0$ in thousand place, I have $2$ choices for one's place ($2, 4$), $3$ remaining for the ten's and $2$ remaining for the hundred place, which is $12$ numbers in total (= $2 \times 3 \times 2$).

So the count of numbers you are interested in $ = 72 - 12 = 60$.