Following this question What's the fewest weights you need to balance any weight from 1 to 40 pounds?
I am interested what is the minimum number M of weights you need to define any integer weight from a) 1 to 40? b) 1 to N?
For example, if N = 2, M = 1. Indeed, with one weight equal 2 you can define any weight X from 1 to 2 ( $1 \le X < 2 \implies X = 1$; $X = 2 \implies X = 2$ ).
With two weights I can go up to N = 8. Take weights 2 and 6, then:
$1 \le X < 2 \implies X = 1$;
$X = 2 \implies X = 2$;
$2 < X < 6-2 \implies X = 3$;
$X = 6-2 \implies X = 4$;
$6-2 < X < 6 \implies X = 5$;
$X = 6 \implies X = 6$;
$6 < X < 6+2 \implies X = 7$;
$ X = 6+2 \implies X = 8$.