# What is the proper math notation for a particular sum of products?

Suppose we have a sequence of distinct $$a_i$$'s: $$\left\{ a_1, a_2, \ldots, a_n \right\}$$. We also have a sequence of not necessarily distinct $$b_i$$'s: $$\left\{ b_1, b_2, \ldots, b_n \right\}$$. Each $$b_i$$ corresponds to how many $$a_i$$'s there are. For example, if $$a_1 = 2$$ and $$b_1 = 3$$, then there are $$3$$ $$2$$'s. The function I have in mind, denoted $$\tau_j$$, is a sum of all possible combinations of products of the $$a_i$$'s where we have all possible combinations such that the sum of the powers of each term equals $$j$$.

I provide the following example. Suppose we have $$a_1 = a_2 = a_3$$ and $$a_4 = a_5$$. Let's rewrite/rename this so we just have two distinct $$a_i$$'s: $$a_1, a_2$$. We can see that $$b_1 = 3$$ and $$b_2 = 2$$. Therefore:

$$$$\tau_0 \left( a_1, a_2 \right) = 1$$$$

$$$$\tau_1 \left( a_1, a_2 \right) = a_1 + a_2$$$$

$$$$\tau_2 \left( a_1, a_2 \right) = a_1^2 + a_1 a_2 + a_2^2$$$$

$$$$\tau_3 \left( a_1, a_2 \right) = a_1^3 + a_1^2 a_2 + a_1 a_2^2$$$$

$$$$\tau_4 \left( a_1, a_2 \right) = a_1^3 a_2 + a_1^2 a_2^2$$$$

$$$$\tau_5 \left( a_1, a_2 \right) = a_1^3 a_2^2$$$$

As we can see, the sum of the powers in each term in each $$\tau_j$$ is equal to $$j$$. Furthermore, any power of any $$a_i$$ cannot exceed its associated $$b_i$$. I am thinking for each term in the sum of each $$\tau_j$$, we have to cycle through powers of each $$a_i$$ from $$0$$ to $$b_i$$ under the condition that the sum of the powers must equal $$j$$.

But the question is: how do we write that? Can we have a sum symbol under a sum symbol, as a condition (by "under", I mean where we would typically have "$$i=0$$")? What is the proper notation for this? Any assistance is greatly appreciated.

• More an approach than a notation, although it does use the generating function notation $[x^j]g(x)$ for the coefficient of $x^j$ of the power series of for $g(x)$: $$[x^j]\prod_{i=1}^n \frac{(a_ix)^{b_i+1}-1}{a_ix-1}$$ Dec 9, 2021 at 7:18
• For your example, $b_1=3,b_2=2,$ $$(1+a_1x+a_1^2x^2+a_1^3x^3)(1+a_2x+a_2^2x^2)\\= 1 + (a_1+ a_2) x + (a_1^2 + a_1 a_2 + a_2 ^2) x^2 \\+ (a_1^3 + a_1^2 a_2 + a_1 a_2 ^2) x^3 + (a_1^3 a_2 + a_1^2 a_2 ^2) x^4 + a_1^3 a_2^2 x^5 ,$$ and $\tau_j$ is the coefficient of $x^j.$ Dec 9, 2021 at 7:33
• @ThomasAndrews This is good. But let's expand on this concept. Suppose I want the sum of all the coefficients (i.e. $x = 1$). How would you write that? Dec 9, 2021 at 8:06
• You can just substute $x=1$ into my formula:$$\sum_{j=0}^{b_1+b_2+\cdots+b_n} \tau_j=\prod\frac{a_i^{b_i+1}-1}{a_i-1}$$ Dec 9, 2021 at 16:35
• For any $a_i=1,$ replace the undefined fraction in the product with $b_i+1=1+a_i+a_i^2+\cdots +a_i^{b_i}.$ Dec 9, 2021 at 16:44

You could use multi-index notation viz.$$\tau_j=\sum_{|\alpha|=j\land\alpha\le b}a^\alpha.$$Here $$a^\alpha:=\prod_ia_i^{\alpha_i}$$, $$|\alpha|:=\sum_i\alpha_i$$ (a multi-index $$\alpha$$ is required to satisfy $$\alpha_i\ge0$$), and $$\alpha\le b$$ abbreviates $$\alpha_i\le b_i$$ for all $$i$$.