# Find the SUM of all the numbers of S.

Let S be the set of all three digits numbers. Such that

1. The digits in each number are all from the set $\left\{1,2,3,\ldots,9\right\}$.
2. Exactly one digit in each number is even.

Then, find the SUM of all the numbers of S. I have tried that, The only even digit can have any of the three positions, And the digit itself has $4$ choices $\left(2, 4, 6\ \mbox{or}\ 8\right)$. The other two digits can be filled in $5 \times 5 = 25$ ways. Then the number of elements in S is $300$.

Observations:

1) The three positions in the number are symmetric in entries for the permutations.

2) Fix the rightmost position (digit) to an even number (2/4/6/8). You can fill up the two other positions in (9-4)*(9-4)=25 ways. So, there are 25 numbers with 2 in the last digit and so on.

3) Fix the rightmost digit to an odd number. You can fill up the two other positions in 9*(9-4)*2=90 ways, there being two cases of where you have even in the 2nd or 3rd digit from right.

Find the sum of all the numbers you get in each position and add them up. In the right most digit, there are 25 entries for even numbers, and 90 for each odd number.

What would all the unit digits add up to?

Can we generalize to the other two digits?

Once we do generalize, how would you find the total sum?

You have done a fair amount of the work to get the answer already.

The sum of possible digits at each place value position is the same; typographically, the left-hand, middle and right-hand digits will all sum to a common value, so you can consider one place and then use that result three times.

Each possible even digit occurs at the chosen place $25$ times, as you observe. So the sum of even digits at that place is $25\cdot (2+4+6+8)$.

Then each odd digitoccurrs at the chosen place $(5\cdot 4 + 4\cdot 5)$ times, giving an overall total for the odds of $40\cdot(1+3+5+7+9)$

Across all digits then, for one place, the total is $25\cdot 20+40\cdot 25 = 1500$ and the total overall is $111\cdot 1500=166500$.

Note that if you permute 3 distinct digits $x,y,z$, then the sum of the six 3-digit number is $111\cdot2(x+y+z)$. If you permute 3 digits $x,x,z$, with $x\not=z$ then the sum of the three 3-digit number is $111\cdot(2x+z)$. Therefore you sum is $$222\sum_{x<y\in\{1,3,5,7,9\}}\sum_{z\in\{2,4,6,8\}}(x+y+z)+111\sum_{x\in\{1,3,6,7,9\}}\sum_{z\in\{2,4,6,8\}}\cdot(2x+z)$$ that is $$222\cdot (16+4)\sum_{x\in\{1,3,5,7,9\}}x +(222\cdot 10+111\cdot5)\sum_{z\in\{2,4,6,8\}}z=166500.$$