18 Oct
2015
18 Oct
'15
1:40 p.m.
Following up on NJAS, who noted The coefficient of x^n in G(x)^m tells you how many ways to express n as a sum (multiple orderings counted multiply, repeats allowed) of m elements of sequence S I note: You can also compute the number of sums with repeated elements of S disallowed, and not allowing multiple orderings of the same sum: for example with m=2 rather than using G(x)^2 use (G(x)^2-G(x^2))/2; with m=3 rather than G(x)^3 use (G(x)^3-G(x^2)*G(x)*3-G(x^3))/6 and similar tricks can be devised for any given m.