Find the sum of all the odd numbers of five-digit that can be made using the digits $0,1,4,5,4.$
1 Answer
The number is a $5$ digit number. This means that $0$ cannot be the $1$st digit.
Also the number must be odd, so the last digit must be either $1$ or $5$. Equipped with this information we can proceed.
There are $2$ choices for the last digit.
There are $3$ choices for the first digit.
There are $3×2×1=6$ ways to arrange the remaining numbers.
$4$ is repeated so we have to divide by $2$
$$\frac {2\cdot 3 \cdot 6}{2}=18$$
Now for the sum of the numbers. $1$ is the last digit in half of the numbers and $5$ is the last digit in the other half. This makes the subtotal $9(1+5)=54$
Now when $1$ was the last digit, out of the $9$ numbers, $5$ was the first digit in exactly $3$ of them and $4$ was the first digit in exaclty $6$ of them. Repeating the same for the case when $5$ is the last digit makes the subtotal $(3(1+5)+12(4))\cdot 10000=660000$
Now lets look at the middle substring formed by the $2,3,4$th digits. This can be
$044,440,404$ each repeated $2$ times
$014,041,140,104,401,410$ each repeated once
$045,054,405,450,504,540$ each repeated once
The substrings above all need to be multiplied by $10$
Adding up all these subtotals, you can reach the answer
-
$\begingroup$ @SMSheikh: Now that you know how many there are, imagine writing them in a column to add up. How many times does each number appear in each column? For example, in the ones column, half of them are $1$ and half are $5$, so the sum of the column is $9(5+1)=54$ $\endgroup$ Commented Mar 29, 2020 at 13:48
-
$\begingroup$ I don't think the problem says that each digit is to be used only once. $\endgroup$ Commented Mar 29, 2020 at 13:53
-
$\begingroup$ @saulspatz It would be then meaningless to list two 4's. $\endgroup$– userCommented Mar 29, 2020 at 13:56
-
1$\begingroup$ Thanks for highlighting. I corrected it $\endgroup$ Commented Mar 29, 2020 at 14:04
-
1$\begingroup$ I also think that for the middle three positions it is advantageous to sum the digits just in one position (and this suffices). $\endgroup$– userCommented Mar 29, 2020 at 14:08