Is there a closed form for the following kind of exhaustive sum of product of $n$ AP series numbers starting from any first integer $\ge 1$ and common difference $\ge 1$?
For a given positive integer $Q$, it has set $Y$ is ordered tuples of $n$ positive integers $>=0$ that adds to $n$. I want to find out the sum of product of the $n$ AP series numbers raised to the corresponding ordered tuples number in the above set $Y$.
$\sum\limits_{Y} \prod\limits_{i=1}^n{x_i^{y_i}}$
where $Y$ is set of all possible ordered tuples of $y_i$ such that $\sum\limits_{i = 1}^ n y_i = q$ for $q$ $\epsilon$ $[0, Q]$. Also, $y_i >= 0$.
Please see the following example for clarity.
For example, say, first term is $a = 2$, with command difference $d=1$, and $n=3$, then the three terms will be $[2, 3, 4]$.
So for $Q = 0: $ $Y$ is $ \{(0, 0, 0)\}$
Hence, expression would evaluate to $(2^0*3^0*4^0) = 1$
Similarly, for $Q = 1: $ $Y$ is $ \{(1, 0, 0), (0, 1, 0), (0, 0, 1)\}$
Hence, expression would evaluate to $(2^1*3^0*4^0) + (2^0*3^1*4^0) + (2^0*3^0*4^1)= 9$
Similarly, for $Q = 2: $ $Y$ is $ \{(2, 0, 0), (0, 2, 0), (0, 0, 2), (1, 1, 0), (0, 1, 1), (1, 0, 1)\}$
Hence, expression would evaluate to $(2^2*3^0*4^0) + (2^0*3^2*4^0) + (2^0*3^0*4^2) + (2^1*3^1*4^0) + (2^0*3^1*4^1) + (2^1*3^0*4^1) = 4 + 9 + 16 + 6 + 12 + 8 = 55$
and so on for any positive value of $Q$.
Currently, I am trying to do it in a brute way. That is, for the given $Q$, I generate the set $Y$, and calculate the product terms one by one and then finally add them up. But this is very computationally intensive.
So I thought there must be some closed form, since all $n$ terms are related and in an arithmetic progression.
Unfortuanately, even after spending days and working out examples, I couldn't find any patterns.
Please help.
Hint: Just compute the generating function and the rest would follow. In other words, given your nonconstant AP $(a_1,a_2,a_3,\dots,a_n)$, extract the coefficient of $t^Q$ in $$ (1+a_1t+a_1^2t^2+\dots)(1+a_2t+a_2t^2+\dots)\dots(1+a_nt+a_n^2t^2+\dots)=\prod_{j=1}^n\frac1{1-a_jt}. $$ Taking partial fractions decomposition $$ \prod_{j=1}^n\frac1{1-a_jt}=\sum_{j=1}^n\frac{c_j}{1-a_jt} $$ we see the coefficient of $t^Q$ is $$ \sum_{j=1}^n c_j a_j^Q. $$
Edit: If you want to compute it for small $Q$ and arbitrary $n$, then probably the best way is to compute the power sum by Bernoulli polynomials $$ p_k:=\sum_{j=1}^n a_j^k=d^k\frac{B_{k+1}(\frac{a_1}d+n)-B_{k+1}(\frac{a_1}d)}{k+1} $$ and use Newton's identity to calculate the $h_k$, $k\leq Q$ $$ kh_k=\sum_{i=1}^k (-1)^{i-1}h_{k-i}p_i $$ The value you want is $h_Q$. The first few are