(I'm very open to suggestions to a better title to my question)
I have four numbers, 10, 20, 30 and 40. I need to multiply each of then by some number so that they are all equal. However the sum of the numbers I multiply by has to be equal to 1.000. As shown in the following table.
$$ \begin{array}{r | r r} n & \text{Multiplier} & \text{Total} \\ \hline 10 & ? \\ 20 & ? \\ 30 & ? \\ 40 & ? \\ \hline 100 & 1000 \end{array} $$
The way I did this was to divide each 1 by n and then sum all of those to get the ratio. Then divide the ratio by the total ratio. (I hope I'm still making sense). As in the following table.
$$ \begin{array}{r | r r} n & \text{Multiplier} & \text{1/n} & \text{Ratio} & \text{Total} \\ \hline 10 & ? & 0.100 & 0.48 \\ 20 & ? & 0.050 & 0.24 \\ 30 & ? & 0.033 & 0.16 \\ 40 & ? & 0.025 & 0.12 \\ \hline 100 & 1000 & 0.208 \end{array} $$
When I have this it's quite straightforward of course to just use the ratios and multiply by 1000 and everything works out great.
My question is however, is it possible to go straight from the information in the first table and find out the ratio or the number required to multiply by without doing 1/n for each number first?
Edit: To clarify what the final table should look like
$$ \begin{array}{r | r r} n & \text{1/n} & \text{Ratio} & \text{Multiply n with} & \text{Total} \\ \hline 10 & 0.100 & 0.48 & 480 & 480\\ 20 & 0.050 & 0.24 & 240 & 480 \\ 30 & 0.033 & 0.16 & 160 & 480 \\ 40 & 0.025 & 0.12 & 120 & 480\\ \hline 100 & & 0.208 & 1000 \end{array} $$