How to identify a summed number given the total and the position (or index) of the summation? I'm not a mathematician, I'm only a programmer with not so good math skills trying to implement something that need this math.
Imagining that somehow a sequence of numbers where given to you, randomly, and while been generated they are summed (through a function, anyway) in a manner that after all you have only the total and you can enter an index (the order or position) and is returned what number was summed in that position.
Ex.:
The computer generated randomly the numbers [6, 45,97,12, 26] and summed through this magical function and returned 186 (or other result). Now, with this result I can enter 4 and the algorithm  will return the value 12, because the fourth number added was 12.
Are there some way I can calculate this?
Please, be nice with that symbols.
Edit.
What I'm trying to says is that, when you add numbers, due to the distributive aspects you can not retrieve the exact same numbers you added. If you have 4 + 8, the result, 12, can be expressed as 8+4, 6+6, 4+4+4, 2+10, etc. But if you have only the result you will never know what the original numbers generated the result. To me, the final result doesn't matter that much since I have some way to make a math operation with may sequence of numbers and having the result and the formula I can search for the original elements of the computation with the original order. Imagine you need to send a message, a sequence of numbers, and your receiver not only need to have the original numbers, but he needs to be able to look the number in the position it was added, without the need of reveal all the number at once, but see the given number in the exact order it was added or the operation he needs to do will fail, the message will not be correct.
So you have thousands of numbers, randomly generated, and you need to transmit, but your receiver will not get thousands of numbers, he needs to get one or two number and a key (the formula) with wich he is able to search, say, he needs to look the numbers added (or processed any way) in the position 637 to the 856 in a moment, so he will get the sum, inform the position he needs and the result will be the number added in that position.
I saying sum, but is a formula, some way to take number in a specific order, compute, get a result and with the result be able to look what was placed in a specific position.
 A: There are many ways to do this.  One of the most elegant is to encode your sequence as follows:
$$
(a_1, a_2, \ldots, a_k)\rightarrow F(a_1,a_2,\ldots, a_k)=2^{a_1} 3^{a_2} \cdots p_k^{a_k},
$$
where $p_k$ is the $k$-th prime number.  To retrieve the $i$-th element, just factor the output and read off the power to which $p_i$ is raised.
Of course, you can encode any string as a number directly: an alternate approach is to treat "6,45,97,12,6" as a string of digits in base $11$ (where the comma is the $11$th digit), and encode your sequence that way.  Then retrieving the $i$-th element is as simple as writing the output in base $11$, splitting on the commas, and reading off the digits in the $i$-th block.
A: Are you asking “given the cumulative sums, how to recover the summands”? In which case, to find the k-th summand, you should do (k-th cumulative sum) minus ((k-1)-th cumulative sum). The convention is that the 0-th cumulative sum is zero.
Example: original sequence is 3 1 2 4. The cumulative sums are (0) 3 4 6 10. So, to find the 2nd number (1), you should do 4 minus 3.
