Sum of all numbers formed by digits 1,2,3,4 & 5.

1.6k Views Asked by At

A five digit number has to be formed by using the digits $1,2,3,4$ and $5$ without repetition such that the even digits occupy odd places. Find the sum of all such possible numbers.

This question came in my test where you literally get $2$ minutes to solve one problem. I want to how to solve this problem more "mathematicaly" instead of listing all the $36$ cases.

2

There are 2 best solutions below

8
On BEST ANSWER

Hint If you subtract a number satisfying the criterion from $66666$, you get a different number satisfying the criterion.

0
On

Choose a position for the $2$. How many of these numbers have the $2$ in that position? There are two options for the $4$ and $3!$ options for the remaining $3$ numbers, that gives you $12$ numbers. Hence the $2$ brings $12\times 20202$ to the sum. Similarly the $4$ brings $12\times 40404$.

Now if you fix an odd number at an even place there are $6$ ways to put the even numbers and then $2$ ways to put the other two odd ones. So $1$ brings $12\times 1010$, $3$ brings $12\times 3030$ and $5$ brings $12\times 5050$.

Finally if you fix an odd number at an odd place there are $2$ options for the other odd ones and $2$ options for the even ones.

Altogether $$S=12\times 69696+4\times 90909$$