Shapovalov A.V.

The weight of each weight in the set is a non-integer number of grams. They can balance any integer weight from 1 g to 40 g (weights are placed on one pan of the scales, the weight to be measured - on the other). What is the smallest number of weights in such a set?
Example 1. Let's take weights of 1, 1, 3, 5, 11, 21, 43 g. The first two can measure any integer weight up to 2 g. Therefore, the first three can measure up to 5 g, the first four up to 10 g, the first five up to 21 g, the first six up to 42 g, and all seven up to 85 g. If we reduce the weight of each weight by half, all the weights will now be non-integer grams, and they can measure any integer or half-integer weight from 0.5 to 42.5 g.

Example 2. Weights of 1, 2, 4, 8, 16, 32, 64 g can measure any integer weight up to 127 g. If we leave only a third of each weight, the weights will become non-integer, and they can measure any integer weight up to 42 g.

Estimation. Suppose there are 6 weights in the set. There are $2^6 = 64$ different subsets. Let's paint one weight yellow and divide the subsets into pairs that differ only by the presence of the yellow weight. Since the weights of the paired subsets differ by the non-integer weight of the yellow weight, at most one of them can have an integer weight in grams. Therefore, there are no more than 32 subsets with an integer weight, and 40 different integer weights cannot be measured with this set of weights.

## Answer

7 weights.