How to Solve box balls with Generating Functions

49 Views Asked by At

I have a question that I thought of.

There are two boxes.

One box has an infinite number of balls, distributed so that there is $1$ ball labeled $1,$ $2$ balls labeled $2,$ and for any positive integer $n,$ $n$ balls labeled $n.$

Another box has also an infinite number of balls, such that it has $1$ ball for all natural numbers.

How many combinations of balls are there such that the sum of the balls are $100$? (All balls are distinct).

I know this is just a massive sum, but I want to learn how to express this in generating functions.

I know I can represent the first box with $\frac{1}{1-x},$ and the second can be represented as $\frac{x^2}{(1-x)^2}+\frac{x}{1-x}$ (if I applied my arithmo-geometric sequence correctly).

I would need to find the $x^{100}$ term of $\frac{1}{1-x}\left(\frac{x^2}{(1-x)^2}+\frac{x}{1-x}\right),$ but with the powers of $(1-x)$ which don't have a useful expansion, it seems impossible to re-expand it.

How do I manipulate the expression $\frac{1}{(1-x)^n}$ to re-expand it?