Mean or mode of pairwise sum-products over all compositions of an integer Let $S>3$ be some positive integer, and let $\mathcal{B}_{S}$ be the set consisting of the $2^{S-1}$ compositions of $S$.
Consider an arbitrary $b\in \mathcal{B}_{S}$, and write $b=[b_{1},b_{2},...,b_{k}]$, where $b_{i}>0$ for all $i$, and $1< k \leq S$.
Define $\phi$ as, $$\phi(b)=\sum_{i\geq 1, j>i}b_{i}b_{j}.$$
For the singleton, $b=[b_{1}]=[S]$, we put $\phi(b)=0$ (or it can be removed from $\mathcal{B}_{S}$). Form the set $\Phi(S)=\{\phi(b) \: : \: \forall b \in \mathcal{B}_{S}\}$
Clearly, (if we discount 0 from the singleton), $\min(\Phi(S))=S-1$, and $\max(\Phi(S))=\binom{S}{2}$, since $\phi$ is monotone with respect to the partial ordering on composition induced by refinement.
Is there an (simple) expression for either the mean (average) or modal value of $\Phi(S)$?  
I have considered working over partitions (to remove the equal $\phi$ contributions arising from cyclically permuted compositions - but it is not clear that this helps).
Any help/hints appreciated.
Attached is a frequency bar chart of $\Phi(18)$, for decoration, with a mean value of $137$.
 A: Claim: The mean value of $\phi(b)$, over all compositions $b$ of an integer $S\ge1$ (including the singleton composition $\{S\}$), equals $\frac12(S^2-3 S+4)-2^{1-S}$ exactly.
Note that
$$
\sum_{1\le i<j\le \ell} x_ix_j = \frac12 \bigg( \bigg( \sum_{1\le i\le\ell} x_i \bigg)^2 - \sum_{1\le i\le\ell} x_i^2 \bigg);
$$
so if $b$ is a composition of $S$, then $\phi(b) = \frac12(S^2 - \sigma(b))$, where
$$
\sigma(b) = \sum_{i\ge1} b_i^2.
$$
Therefore the claim above follows from the following claim: the mean value of $\sigma(b)$, over all compositions $b$ of an integer $S\ge1$, equals $3 S-4+2^{2-S}$ exactly.
In other words, we need to show that $\Sigma(S)$, defined to be the sum of $\sigma(b)$ over all compositions $b$ of an integer $S\ge1$, equals $2^{S-1}(3 S-4)+2$. (Note that $\Sigma(b)$ equals the $(b+1)$st element of sequence 27992 of the OEIS; the claim in this paragraph is actually stated as a conjecture of R. Stephan there, after reindexing).
Finally, note that the sequence $t_S = \{2^{S-1}(3 S-4)+2\}$ satisfies the recursion $t_S = 2t_{S-1} + 3\cdot2^{S-1}-2$. Since trivially $t_1=1=\Sigma(1)$, it suffices to show that $\Sigma(S)$ satisfies the same recursion; in other words, we need to show that
$$
\Sigma(S) = 2\Sigma(S-1) + 3\cdot2^{S-1}-2.
$$
Consider the following operation $\tau$ on compositions: subtract $1$ from the final entry (then delete it if it equals $0$). For example, both $\tau(\{6,4,3\})$ and $\tau(\{6,4,2,1\})$ equal $\{6,4,2\}$. Note that if the last element of a composition $b$ is denoted by $z(b)$, then $\sigma(b)-\sigma(\tau(b)) = z(b)^2-(z(b)-1)^2 = 2z(b)-1$. Note also that $\tau$ is a $2$-to-$1$ map from the set of compositions of $S$ to the set of compositions of $S-1$ (by the usual stars-and-bars argument). Therefore
$$
\Sigma(S) = \sum_{b\in\mathcal B_S} \sigma(b) = 2 \sum_{b\in\mathcal B_{S-1}} \sigma(b) + \sum_{b\in\mathcal B_S} (2z(b)-1) = 2\Sigma(S-1) + 2\sum_{b\in\mathcal B_S} z(b) - 2^{S-1}.
$$
Now $2^{S-2}$ compositions of $S$ end in $1$, and $2^{S-3}$ compositions of $S$ end in $2$, ..., and $1$ composition of $S$ ends in $S-1$, and the last one ends in $S$. (again, stars and bars). We conclude that
$$
\Sigma(S) = 2\Sigma(S-1) + 2 \bigg( S + \sum_{1\le z\le S-1} z\cdot 2^{S-1-z} \bigg) - 2^{S-1};
$$
and it's an easy exercise to show that the right-hand side equals $2\Sigma(S-1) + 3\cdot2^{S-1}-2$, as required.
