Suppose a set of weights contains one 1g, one 2g and two 10g. There are 11 different weights that can be achieved by combining these.
Is it possible to come up with a formula that would calculate the number of different combinations possible for any set of weights? (For example, a 2g + 3g and 5g are equal, so will count as only one).