Suppose $n\ge4$. Show that in a list of all $2^{n-1}$ compositions of $n$, the integer $3$ occurs exactly $n2^{n-5}$ times.
[Hint: Look at ways of drawing lines between n dots.]
The number of k-term compositions of $n$ is $\binom{n−1}{k−1}$, for $k\le n$.
We have the two lines $3$ apart and then some combinations on the left of the lines and some combinations on the right of the lines to count but I can't figure out what they are.
Any help would be greatly appreciated!