Maxima Function
comp2pui (n, L)
implements passing from the complete symmetric functions given in the list L to the elementary symmetric functions from 0 to n. If the list L contains fewer than n+1 elements, it will be completed with formal values of the type h1, h2, etc. If the first element of the list L exists, it specifies the size of the alphabet, otherwise the size is set to n.
(%i1) comp2pui (3, [4, g]); 2 2 (%o1) [4, g, 2 h2 - g , 3 h3 - g h2 + g (g - 2 h2)]