As an example for number 5, it is equal to $2^4$.
We can prove it by brute-forcing it, since it's a small number, as follows:
$1+1+1+1+1 $
$1+1+1+2 $
$1+1+2+1 $
$1+2+1+1 $
$2+1+1+1$
$1+1+3 $
$1+3+1$
$3+1+1$
$2+2+1$
$2+1+2$
$1+2+2$
$2+3$
$3+2$
$1+4$
$4+1$
$5$
What is a faster, more elegant way to do this?
Let $f(n)$ be the number you're looking for for a given $n$. Let's work by strong induction.
Consider $f(n+1)$. It could either have one term (which happens in one way) or more than one term. In this second case, the second term can be any number from $1$ through $n$. If the first term is $k$, then there are $f(n+1-k)$ ways to complete that sum. Adding all that together with our induction hypothesis that $f(k)=2^{k-1}$, we get
$$f(k+1)=1+2^0+2^1+...+2^{k-1}$$
which is obviously $f(k+1)=2^k$.