I would like to generate automatically a polynomial in two variables $(s,t)$ which is symmetric under the exchange of those variables. There are three kinds of terms; at order $k$, we have $$(s+t)^k, \quad (st)^k, \quad (s+t)^a(st)^b,$$ where $a+b=k$. Using a simple sum it is not difficult to write down in Mathematica the first two types. If "ord" is the degree of the polynomial, I just define a function $poly[s,t,ord]$ as $$\sum_{i=0}^{ord} \big( c_i(s+t)^i +d_i(st)^i \big),$$ where $c_i,d_i$ are some coefficients.
But how can I generate the third type?
(s+t)^k
isk
and the degree of(st)^k
is2k
and the degree of(s+t)^a (st)^b
isa+2b
, what is the order do you want? $\endgroup$