In how many ways can a positive integer $n$ be expressed as a summation of positive integers less than $n$ For example if I take $n=5$, then I can express it in the following ways:


*

*$1+1+1+1+1$

*$2+3$

*$3+2$

*$1+4$

*$4+1$

*$1+1+3$

*$1+3+1$

*$3+1+1$

*$2+2+1$

*$2+1+2$

*$1+2+2$


Please note that the order of terms in the expression of summation also counts if the terms are distinct.

We can also do this by finding the number of ordered partitions of $n$ into exactly $r$ parts and then summing them over from $1$ to $n$.
When we have exactly $r$ partitions of $n$, we have the generating function $(x+x^2+x^3+...)^r=x^r/(1-x)^r$ 
Now, we must pick the coefficient of $x^n$ from
$x^r[1+\binom{r}{1}x + \binom{r+1}{2} x^2 +.....+ \binom{r+(n-r-1)}{n-r}x^{n-r}+....]$
which is  $\binom{n-1}{r-1}$
This is the general expression for orders partition of $n$ into $r$ parts.
To find all partitions we must evaluate 
$\sum_{i=1}^n \binom{n-1}{r-1} = \binom{n-1}{0} + \binom{n-1}{1} + \binom{n-1}{2} +....+ \binom{n-1}{n-1}$
Considering the binomial expansion of $(1+x)^{n-1}$, we have 
$\binom{n-1}{0} + \binom{n-1}{1}x+ \binom{n-1}{2}x^2 +....+ \binom{n-1}{n-1}x^{n-1}$
Putting $x=1$ in the above expression,we get
$\sum_{i=1}^n \binom{n-1}{r-1} =(1+1)^{n-1}=2^{n-1}$
But this also contains the partition of the form $n=n$, which is not allowed.So required number of partitions is $2^{n-1} -1$.

For this question with $n=5$, total number of required partitions is 

 $2^{5-1}-1=2^4-1=15$

