i1 : n=5;
i2 : R=QQ[x_1..x_n];
i3 : f=(product gens R)*(sum gens R);
i4 : elementarySymmetric f o4 = e e 1 5 o4 : S
This function should work up to a size of 15 variables in the base ring.
This function is part of the package SymmetricPolynomials.