5. Given $n$ distinct positive numbers. Sums are formed from them with any number of addends from 1 to $n$.

a) What is the smallest number of different sums that can be obtained

b) What is the largest number of different sums that can be obtained
Answer: a) $\frac{1}{2} n(n+1)$; b) $2^{n}-1$.

Solution. We can assume that the original positive numbers are arranged in ascending order: $a_{1}<a_{2}<\ldots<a_{n}$. Consider the numbers

![](https://cdn.mathpix.com/cropped/2024_05_06_d04aaef810efad95dfa3g-2.jpg?height=46&width=1309&top_left_y=1748&top_left_x=447)

\[
\begin{aligned}
& \begin{array}{lllll}
a_{1}+a_{n}, & a_{2}+a_{n}, & \ldots & a_{n-2}+a_{n}, & a_{n-1}+a_{n},
\end{array} \\
& \begin{array}{llll}
a_{1}+a_{n-1}+a_{n}, & a_{2}+a_{n-1}+a_{n}, & \ldots & a_{n-2}+a_{n-1}+a_{n}
\end{array} \\
& a_{1}+a_{2}+\ldots+a_{n}
\end{aligned}
\]

Clearly, each number is greater than the previous one, so all the listed numbers are distinct. Their count is $n+(n-1)+\ldots+1=\frac{1}{2} n(n+1)$, which meets the requirements of the problem.

It remains to provide an example where it is impossible to obtain more than $\frac{1}{2} n(n+1)$ different sums. For this, a set of the first $n$ natural numbers will suffice, from which no more than $\frac{1}{2} n(n+1)$ different sums can be formed: these sums are all natural numbers from 1 to $1+2+\ldots+n=\frac{1}{2} n(n+1)$.

b) Each number $a_{i}$ either enters or does not enter the considered sum. Additionally, we need to exclude the sum that contains no addends, so the number of different sums from $n$ addends can be no more than $2^{n}-1$.

The numbers $1,10,10^{2}, \ldots, 10^{n-1}$ provide an example of $n$ different numbers from which the maximum number of different sums can be formed. The sum of any $k$ numbers from this set is a number whose decimal representation uses only 1 and 0. Each such sum can be represented as an $n$-element ordered set of 0s and 1s. Since each position in the set can have only two digits, their total number is $2 \cdot 2 \cdot \ldots \cdot 2=2^{n}$. The only impossible set, consisting of $n$ zeros, must be excluded, so the total number of valid sets is $2^{n}-1$.

Criteria. The solution to each of parts a) and b) is worth 3 points. In part a), proving that there are at least $\frac{1}{2} n(n+1)-2$ different sums is worth 2 points. Providing an example with the smallest number of different sums is worth 1 point. In part b), proving that there are no more than $\left(2^{n}-1\right)$ different sums is worth 1 point. Providing an example with the largest number of different sums is worth 2 points. A complete solution to both parts is worth 7 points.