[Math] Finding the sum of all four-digit numbers that can be formed using the digits $0$, $1$, $2$, $4$ without repetition

combinatorics

Using the digits $0$,$1$,$2$ and $4$, find the sum of all four-digit numbers that can be formed. Repetitions not allowed.

total number of $4$-digit numbers that can be formed $= 3 \cdot 3 \cdot 2 \cdot 1 = 18$ numbers.

Total number of times each digit appears$= 18/4=4.5=4$ times. But answer is wrong, although my approach of doing it isn't wrong I feel. What mistake am I doing in finding the number of times each digit appears?

Best Answer

There are $4!=24$ numbers using the digits $0$, $1$, $2$, $4$ without repetition. Each of these digits appears $6$ times at each of the four decimal places. The sum of these $24$ numbers therefore is $(0+1+2+4)\cdot6666=46\,662$. We now have to eliminate the $6$ numbers beginning with a $0$. In these $6$ numbers each of the digits $1$, $2$, $4$ appears two times at each of the three last decimal places. The sum of the $6$ forbidden numbers therefore is $7\cdot222=1554$. It follows that the sum of all allowed numbers in this game is $46\,662-1554=45\,108$.