In a simpler version of the problem, the same five numbers have been written on each card, so, an individual number may be added more than once. Each sum is unique, and we are asked to find the numbers that allow the trick to work and also give the minimum sum of all possible sums.
The answer is (1, 2, 5, 16, 25) with a sum of all sums of 1029.
The next closest answer is (1, 2, 5, 17, 27) with a sum of sums of 1092,
and the next is 1, 3, 6, 15, 26 with a sum of 1113.
Another non-optimal answer is (3, 6, 7, 16, 31) with a sum of sums of 1323.
It is noticed that all answers to this optimization problem are different by multiples of 21. Why is this?