Let us find explicit integer functions for the coefficients of the monomial expansion of $$ Q \left( x_1, \ldots , x_n \right) = \prod_{\left( \kappa_1, \ldots , \kappa_{n-1} \right) \in \{-1,1\}^{n-1}}{\left( x_n+\sum_{i=1}^{n-1}{\kappa_i x_i } \right)} $$
In the following we shall see that these coefficients may be given by a specialization of the elementary vector-symmetric polynomials.
The ancient difference of squares identity corresponds to finding the monomial expansion of $ Q \left(x_1, x_2 \right) $, so one may view this question as a certain generalization of the former.
Geometric context for the polynomial (function) $ Q $ can be seen in the generalized Heron polynomials (proposition 8) and the hyperplane threshold arrangements (section 1.2).
Elementary vector-symmetric polynomials
Let $n,m$ be positive integers. Denote $ X_{m}^{n} \equiv \left( x_{m,1}, \dots, x_{m,n} \right)$ as an ordered commuting alphabet. Denote $\boldsymbol{\lambda} \equiv \left( \lambda_1, \ldots, \lambda_n \right)$ as a vector with non-negative integer entries. Denote $\left[ n \right] \equiv \{1, \ldots, n\}$.
The elementary vector-symmetric polynomial (also known as elementary multisymmetric polynomial) $\operatorname{\mathfrak{e}}_{\boldsymbol{\lambda}} \left( X_{1}^{n}, \ldots, X_{m}^{n} \right) $ is given by $$ \operatorname{\mathfrak{e}}_{\boldsymbol{\lambda}} \left( X_{1}^{n}, \ldots, X_{m}^{n} \right) = \sum_{\substack{ I_1 \cup \dots \cup I_n \subseteq \left[ m \right] \\ \lvert I_1 \rvert = \lambda_1, \ldots , \lvert I_n \rvert = \lambda_n \\ I_1 , \dots , I_n \, \text{2-wise disjoint}}}{\prod_{j \in \left[ n \right]}{} \prod_{i \in I_j}{x_{i,j}}} $$
Note that if $ \lambda_1 = \dots = \lambda_n=0 $ then $$ \operatorname{\mathfrak{e}}_{\boldsymbol{\lambda}} \left( X_{1}^{n}, \ldots, X_{m}^{n} \right) = 1 $$ and if $ \lambda_1 + \dots + \lambda_n > m $ then $$ \operatorname{\mathfrak{e}}_{\boldsymbol{\lambda}} \left( X_{1}^{n}, \ldots, X_{m}^{n}\right) = 0 $$ See Cullis' Matrices and Determinoids vol. III (section 197, pages 134-135) and Rota & Stein's A problem of Cayley from 1857 (appendix A, appendix B) for further reading and examples, though the definitions given there use different notation than the one employed here. EDIT: See Diaz & Pariguan's paper Quantum Product of Symmetric Functions (equations (9) to (12), lemma 4) for a definition more in tune with the one given here.
Q as a Cayley form and its expansion
Suppose now that $ n \ge 2 $.
The polynomial $ Q $ is a product of $2^{n-1}$ linear forms in $ x_1, \ldots , x_n $. A product of linear forms is sometimes known in the literature as a Cayley form.
The coefficients of the monomial expansion of a Cayley form can be expressed by elementary vector-symmetric polynomials in the coefficients of the associated linear forms (see section 197, pages 136-137 of Cullis' text linked above; see equation (9) of Diaz & Pariguan's paper linked above).
Denote $ \lvert \boldsymbol{\lambda} \rvert \equiv \lambda_1 + \dots + \lambda_n $. Denote $ \mathrm{K}_{m}^n \equiv \left( \kappa_{m,1}, \ldots, \kappa_{m,n} \right) $. Then $$ Q \left( x_1, \ldots , x_n \right) = \sum_{\lvert \boldsymbol{\lambda} \rvert = 2^{n-1}}{\operatorname{\mathfrak{e}}_{\boldsymbol{\lambda}} \left( \mathrm{K}_{1}^{n}, \ldots, \mathrm{K}_{2^{n-1}}^{n} \right) \prod_{j \in \left[ n \right]}{x_{j}^{\lambda_j}}} $$ Note that $ Q $ is a homogeneous of degree $ 2^{n-1} $ polynomial in $ x_1, \ldots , x_n $.
Suppose now that $ n \ge 3 $.
This MSE answer by Ilya Bogdanov shows that $ Q $ is an even function of $ x_1, \ldots , x_n $, or equivalently the monomials of the polynomial $ Q $ which have an odd exponent have also coefficient $ 0 $. Therefore $$ Q \left( x_1, \ldots , x_n \right) = \sum_{\lvert \boldsymbol{\lambda} \rvert = 2^{n-2}}{\operatorname{\mathfrak{e}}_{2\boldsymbol{\lambda}} \left( \mathrm{K}_{1}^{n}, \ldots, \mathrm{K}_{2^{n-1}}^{n} \right) \prod_{j \in \left[ n \right]}{ \left( x_{j}^2 \right)^{\lambda_j}}} $$
Note that $ Q $ is a homogeneous of degree $ 2^{n-2} $ polynomial in $ x_{1}^2, \ldots , x_{n}^2 $.
The same answer by Ilya Bogdanov also shows that $ Q $ is a symmetric polynomial.
Recall that the monomial symmetric polynomials in $ x_{1}^2, \ldots , x_{n}^2 $ of degree $2^{n-2}$ are a basis of the vector space of symmetric polynomials in $ x_{1}^2, \ldots , x_{n}^2 $ which are homogenous of degree $ 2^{n-2} $.
Let us index the (expanded) polynomial $Q$ in $ x_{1}^2, \ldots , x_{n}^2 $ by integer partitions of $ 2^{n-2} $ (possibly padded with $0$s to the right), or equivalently to write $ Q $ using the monomial symmetric polynomials in $ x_{1}^2, \ldots , x_{n}^2 $ of degree $ 2^{n-2} $.
Suppose now that the entries of $\boldsymbol{\lambda}$ are non-increasing, so one can identify the vector $\boldsymbol{\lambda}$ with an integer partition $\lambda$, by dropping the $0$ entries of $\boldsymbol{\lambda}$, or by padding $\lambda$ with $0$s to the right; specifically $$ \lambda \vdash 2^{n-2} \iff \lvert \boldsymbol{\lambda} \rvert = 2^{n-2} $$ Denote $ \operatorname{m}_{\lambda} \left( x_{1}^2, \ldots , x_{n}^2 \right) $ as the monomial (usual, non-vector-)symmetric polynomial in $x_{1}^2, \ldots , x_{n}^2$ indexed by the integer partition $\lambda$. Then $$ Q \left( x_1, \ldots , x_n \right) = \sum_{\lvert \boldsymbol{\lambda} \rvert = 2^{n-2}}{\operatorname{\mathfrak{e}}_{2\boldsymbol{\lambda}} \left( \mathrm{K}_{1}^{n}, \ldots, \mathrm{K}_{2^{n-1}}^{n} \right) \operatorname{m}_{\lambda} \left( x_{1}^2, \ldots , x_{n}^2 \right)} $$
Associated recursive formula
The polynomial (function) $$ q \left( y_1, \ldots , y_n \right) \equiv \sum_{\lvert \boldsymbol{\lambda} \rvert = 2^{n-2}}{\operatorname{\mathfrak{e}}_{2\boldsymbol{\lambda}} \left( \mathrm{K}_{1}^{n}, \ldots, \mathrm{K}_{2^{n-1}}^{n} \right) \operatorname{m}_{\lambda} \left( y_{1}, \ldots , y_{n} \right)} $$ admits a recursive formula described generally in a previous MO question or more simply in another previous MO question.
Integer functions for the coefficients of the form $ \operatorname{\mathfrak{e}}_{2\boldsymbol{\lambda}} \left( \mathrm{K}_{1}^{n}, \ldots, \mathrm{K}_{2^{n-1}}^{n} \right) $
Heron matrix
Let us consider a useful object which deserves its own inquiry.
Consider a matrix $ \mathbf{K} \in \{-1,1\}^{2^{n-1} \times n} $ such that $ \left( \mathbf{K} \right)_{i,j} = \kappa_{i,j} $. Such a matrix is sometimes known in the literature as a (non-normalized) Heron matrix.
$ \mathbf{K} $ has some neat and useful properties, such as:
- Its rows are pairwise linearly-independent (over a ring not of characteristic $2$).
- $ \operatorname{rank}\left(\mathbf{K}\right) = n$.
- It is a partial Hadamard matrix, meaning that $$ \mathbf{K}^{\top} \mathbf{K}= 2^{n-1} \mathbf{I}_{n} $$ or equivalently that any two of its columns agree at exactly half the entries.
- Its last column is $ \boldsymbol{1} $ and all the other columns have exactly half their entries be $-1$.
Incremented factorial powers
Let us consider another useful object.
Denote $x^{t;u}$ as the $u$-incremented $t$-factorial-power of $x$, where $t$ is a non-negative integer. Then $x^{t;u}$ is given by $$ x^{t;u} \equiv \begin{cases} 1, & \text{if $t=0$} \\ \prod_{i=0}^{t-1}{\left(x-ui\right)}, & \text{if $t \ge 1$} \end{cases} $$
Examples
The usual $n$-th power of $x$ is given by $$ x^n = x^{n;0} $$ The $n$-th falling factorial power of $x$ (using Knuth's notation) is given by $$ x^{\underline{n}} = x^{n;1} $$ The $n$-th rising factorial power of $x$ (using Knuth's notation) is given by $$ x^{\overline{n}} = x^{n;-1} $$
Experimental results
Denote $ \ell \left(\boldsymbol{\lambda} \right) $ as the $\#$ of non-zero entries of $ \boldsymbol{\lambda} $, so one may identify $ \ell \left(\boldsymbol{\lambda} \right) $ with the usual length of the integer partition $\lambda$ of $2^{n-2}$.
If $ \ell \left(\boldsymbol{\lambda} \right) = 1 $, or equivalently if $$ \boldsymbol{\lambda} = \left( \lambda_1, 0, \ldots \right) $$ then $$ \begin{align} \operatorname{\mathfrak{e}}_{2\boldsymbol{\lambda}} \left( \mathrm{K}_{1}^{n}, \ldots, \mathrm{K}_{2^{n-1}}^{n} \right) & = 1 \\ & = \frac{\left( \lambda_1 - 1 \right)^{\lambda_{1};2}}{\left( \lambda_1 - 1 \right)^{\lambda_{1};2}} \frac{\lambda_{1}!}{\lambda_{1}!} \end{align} $$ because it corresponds to a product of the entries of any one column of the Heron matrix $ \mathbf{K} $.
If $ \ell \left(\boldsymbol{\lambda} \right) = 2 $, or equivalently if $$ \boldsymbol{\lambda} = \left(\lambda_1 , \lambda_2, 0, \ldots \right) $$ then experimental evidence suggests that $\operatorname{\mathfrak{e}}_{2\boldsymbol{\lambda}} \left( \mathrm{K}_{1}^{n}, \ldots, \mathrm{K}_{2^{n-1}}^{n} \right) $ is given by $$ \frac{\left( \lambda_1 + \lambda_2 - 1 \right)^{\lambda_{1} + \lambda_{2};2}}{\left( \lambda_1 + \lambda_2 - 1 \right)^{\lambda_{1};2}\left( \lambda_1 + \lambda_2 - 1 \right)^{\lambda_{2};2}} \frac{\left( \lambda_{1} + \lambda_{2} \right)!}{\lambda_{1}! \lambda_{2}!} $$ Notice that the latter is a symmetric function in $\lambda_{1}, \lambda_{2}$, as is expected.
If $ \ell \left(\boldsymbol{\lambda} \right) = 3 $, or equivalently if $$ \boldsymbol{\lambda} = \left(\lambda_1, \lambda_2, \lambda_3, 0, \ldots\right) $$ then experimental evidence suggests that $\operatorname{\mathfrak{e}}_{2\boldsymbol{\lambda}} \left( \mathrm{K}_{1}^{n}, \ldots, \mathrm{K}_{2^{n-1}}^{n} \right) $ is given by $$ {\left( \lambda_1 + \lambda_2 + \lambda_3 - 1 \right)^{\lambda_{1} + \lambda_{2} + \lambda_{3};2} \over \prod_{i=1}^{3}{\left( \lambda_1 + \lambda_2 + \lambda_3 - 1 \right)^{\lambda_{i};2}}} \frac{\left( \lambda_{1} + \lambda_{2} +\lambda_{3} \right)!}{\lambda_{1}! \lambda_{2}! \lambda_{3}!} $$ Notice that the latter is a symmetric function in $\lambda_{1}, \lambda_{2}, \lambda_{3}$, as is expected.
Unfortunately, the observed pattern from the last three examples seems to break in the following case.
If $ \ell \left(\boldsymbol{\lambda} \right) = 4 $, or equivalently if $$ \boldsymbol{\lambda} = \left(\lambda_1, \lambda_2, \lambda_3, \lambda_4, 0, \ldots\right) $$ then experimental evidence suggests that $\operatorname{\mathfrak{e}}_{2\boldsymbol{\lambda}} \left( \mathrm{K}_{1}^{n}, \ldots, \mathrm{K}_{2^{n-1}}^{n} \right) $ is given by $$ \begin{align} & \left[ \sum_{k=0}^{\lambda_4}{\left( \binom{\lambda_3}{k} \binom{\lambda_4}{k}k!2^{k} \right.} \right. \\ & \qquad \qquad \times \left( \lambda_1 + \lambda_2 + \lambda_3 + \lambda_4 - 1 \right)^{\lambda_{1} + \lambda_{3} + \lambda_{4} - k;2} \\ & \qquad \qquad \times \left( \lambda_1 + \lambda_2 + \lambda_3 + \lambda_4 - 1 \right)^{\lambda_{2} + \lambda_{3} + \lambda_{4} - k;2} \\ & \qquad \qquad \times \left( \lambda_1 + \lambda_2 + \lambda_3 + \lambda_4 - 1 \right)^{\lambda_{1} + \lambda_{2} + k;2} \\ & \qquad \qquad \times \frac{\left( \lambda_1 + \lambda_2 + \lambda_3 + \lambda_4 - 2 \right)^{\lambda_{3} + \lambda_{4} - k;4}}{\left( \lambda_1 + \lambda_2 + \lambda_3 + \lambda_4 - 2 \right)^{\lambda_{3};4}} \\ & \qquad \qquad \times \left. \left. \frac{\left( \lambda_1 + \lambda_2 + \lambda_3 + \lambda_4 \right)^{k;4}}{\left( \lambda_1 + \lambda_2 + \lambda_3 + \lambda_4 - 2 \right)^{\lambda_{4};4}} \right) \right] \end{align} \\ \times {\left( \lambda_1 + \lambda_2 + \lambda_3 + \lambda_4 - 1 \right)^{\lambda_{1} + \lambda_{2} + \lambda_{3} + \lambda_{4};2} \over \prod_{1 \le i < j \le 4}{\left( \lambda_1 + \lambda_2 + \lambda_3 + \lambda_4 - 1 \right)^{\lambda_{i}+\lambda_{j};2}}} \\ \times \frac{\left( \lambda_{1} + \lambda_{2} +\lambda_{3} + \lambda_{4} \right)!}{\lambda_{1}! \lambda_{2}! \lambda_{3}! \lambda_{4}!} $$ Unfortunately I wasn't able to find a symmetric form of the latter, but experimental evidence suggests that it is indeed a symmetric function in $\lambda_{1}, \lambda_{2}, \lambda_{3}, \lambda_{4}$ (wherever $\lambda_{1} + \lambda_{2} + \lambda_{3} + \lambda_{4}=2^{n-2}$ and $n \ge 4$).
Questions
#1
How to prove the formulae for $ \operatorname{\mathfrak{e}}_{2\boldsymbol{\lambda}} \left( \mathrm{K}_{1}^{n}, \ldots, \mathrm{K}_{2^{n-1}}^{n} \right) $ in the cases of $ \ell \left(\boldsymbol{\lambda} \right) = 2,3,4 $?
#2
What is a symmetric form of $ \operatorname{\mathfrak{e}}_{2\boldsymbol{\lambda}} \left( \mathrm{K}_{1}^{n}, \ldots, \mathrm{K}_{2^{n-1}}^{n} \right) $ in the case of $ \ell \left(\boldsymbol{\lambda} \right) = 4 $?
#3
What is an explicit formula for $ \operatorname{\mathfrak{e}}_{2\boldsymbol{\lambda}} \left( \mathrm{K}_{1}^{n}, \ldots, \mathrm{K}_{2^{n-1}}^{n} \right) $ in the case of a general $ \boldsymbol{\lambda}$?