Determine all positive integers $n$ for which there exists a set $S$ with the following properties:

(i) $S$ consists of $n$ positive integers, all smaller than $2^{n-1}$;

(ii) for any two distinct subsets $A$ and $B$ of $S$, the sum of the elements of $A$ is different from the sum of the elements of $B$.
Answer: all integers $n \geqslant 4$.

Direct search shows that there is no such set $S$ for $n=1,2,3$. For $n=4$ we can take $S=\{3,5,6,7\}$. If, for a certain $n \geqslant 4$ we have a set $S=\left\{a_{1}, a_{2}, \ldots, a_{n}\right\}$ as needed, then the set $S^{*}=\left\{1,2 a_{1}, 2 a_{2}, \ldots, 2 a_{n}\right\}$ satisfies the requirements for $n+1$. Hence a set with the required properties exists if and only if $n \geqslant 4$.