Question on finding sum of all numbers formed by given numbers where zero is also included.

43 Views Asked by At

Find the sum of all the odd numbers of five-digit that can be made using the digits $0,1,4,5,4.$

1

There are 1 best solutions below

9
On

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