Let's consider various representations of a natural number $n \geq 4$ as a sum of positive integers, in which the order of summands is important (i.e. compositions). The task is to prove the number $3$ appears altogether $n2^{n-5}$ times in all of them.
I know there're $2^{n-1}$ compositions of $n$. However, I have no clue as to how to count only those involving the number(s) $3$. I can't think of any sensible generating function for this. Maybe there's a nice combinatorial interpretation of the given formula, which I can't figure out? Could anyone lend me a hand with handling this problem?