What is the number of different sums of the items of a set of consecutive natural numbers? I have been playing around with sets of consecutive natural numbers like say $S=\{1,2,3,...,10\}$ and I have come up with this problem for which however I have not yet found an answer and I don't know if there is one. My problem is the following: Considering a set $S=\{1,2,3,...,n\}$ where $n$ is an arbitrary natural number, can we derive a formula that will indicate the number of different sums that will be produced by summing the items of the set $S$ in all different combinations? For example for the set $S=\{1,2,3,4,5\}$ we get:
$$1+2=3\\
1+2+3=6\\
1+2+3+4=10\\1+3+4+5=13\\1+2+4+5=12\\1+2+3+4+5=15\\
1+2+3+5=11\\1+4+5=10\\1+3+5=9\\1+3+4=8\\1+2+5=8\\1+2+4=7\\1+3=4\\1+4=5\\1+5=6\\
2+3=5\\2+4=6\\2+5=7\\
2+3+4=9\\2+3+5=10\\2+4+5=11\\
2+3+4+5=14\\
3+4=7\\3+5=8\\
3+4+5=12\\
4+5=9\\$$
So we have $26$ different summations and $13$ different sums(I hope I didn't make any mistake)

Assuming you mean sums of $2$ or more elements, you can get any value between $3$ and $n(n+1)/2.$
If $U\subsetneq \{1,2,3,\ dots,n\},$ we can show either:

*

*$1\not\in U,$ or

*$\exists k<n$ such that $k\in U,$ $k+1\notin U$
In the first case, we can create $U’=U\cup\{1\},$ and the second case we can set $U’=U\setminus \{k\}\cup \{k+1\}.$ In both cases: $$\sum_{j\in U’} j = 1+\sum_{j\in U} j.$$
On the case $n=5,$ we can construct a sequence:
$$\begin{align}3&=1+2\\4&=1+3\\5&=2+3\\6&=1+2+3\\7&=1+2+4\\8&=1+3+4\\9&=2+3+4\\10&=1+2+3+4\\11&=1+2+3+5\\12&=1+2+4+5\\13&=1+3+4+5\\14&=2+3+4+5\\15&=1+2+3+4+5
\end{align}$$
Note this sequence has the values satisfying $n=4$ for the values $3$ to $10,$ the values $3$ to $6$ only use values for $n=3.$
You can see how to extend this for $n=6,$ getting values $16,\dots,21$ via: $$\begin{align} 21-j&=1+2+3+4+5+6-j, j=1,\dots5,\\
21&=1+2+3+4+5+6
\end{align}$$
