A pharmacist uses 5 separate weights: 1 g, 2g, 4 g, 8 g and 16 g. If the pharmacist can combine these weights to create new weights, how many different weights are possible?
Well, it's a simple problem. You could just find the possible combinations of picking differing sets of weight. Combinations of 1 weight picked from 5, combinations of 2 weights picked from 5, combinations of 3 weights picked from 5... Etc. You use the following formula for n being the total number of weights and r being the number of weights you're choosing:
For r=0:
For r=1:
For r=2:
For r=3:
For r=4:
For r=5:
Now you add them all together:
That tells you that there are 32 possible combinations