Closed-form solution of sum over compositions?

63 Views Asked by At

I am interested in calculating a closed-form solution of the following sum over compositions $$ \sum_{\substack{n_1 + \dots + n_M = N \\ n_i \geq 1}} \dfrac{n_1^2 + \dots + n_M^2}{n_1(N-n_1)! \dots n_M (N-n_M)!}, $$ for given integers $N$ and $M$. So far, I have been able to prove that $$\sum_{\substack{n_1 + \dots + n_M = N \\ n_i \geq 1}} \dfrac{1}{n_1(N-n_1)! \dots n_M (N-n_M)!} = \dfrac{M!}{N!} B_{N,M}(x_1, \dots, x_{N-M+1}),$$ where $B_{N,M}$ is the partial Bell polynomial evaluated at $x_i = \dfrac{(i-1)!}{(N-i)!}$ for $i=1,\dots, N-M+1$. This result is relatively straightforward as it is a sum of the type $$\sum_{\substack{n_1 + \dots + n_M = N \\ n_i \geq 1}} \prod_{i=1}^{M} f(n_i),$$ for which a closed-form solution is known. However, I do not know how to proceed from there, or, more generally, whether there is a closed-form solution for sums over of the type $$\sum_{\substack{n_1 + \dots + n_M = N \\ n_i \geq 1}} \sum_{i=1}^{M} f(n_i).$$ Perhaps there is something obvious I am not seeing. Any help is welcome.