How to express this combination as a formula? Suppose that I have an infinite set $A(z)$, where the elements of the set are:
$$
A(z) = \{z^0,z^1,z^2,...\}
$$
I want to get the number of ways that I can combine its elements if I multiply the set with itself, where the multiplication is an operation that results in another set (call this set the product). The product has coefficients for each element that counts the number of ways it was produced from the multiplication. For example,
$$
A(z)^2=A(z)A(z)=\{z^0z^0,z^0z^1,z^1z^0,z^1z^1,z^0z^2,z^2z^0,z^1z^2,z^2z^1,...\}=\{z^0,2z^1,3z^2,....\}
$$
So in $A(z)^2$, the coefficient of $z^1$ is $2$, since there are two ways to come up with $z^1$ from $A(z)^2$, i.e. $\{z^0z^1,z^1z^0\}$. The coefficient of $z^2$ is $3$, since there are three ways to come up with $z^2$ from $A(z)^2$, which are $\{z^0z^2,z^2z^0,z^1z^1\}$ ...
Now I'd like to ask, is there a formula that can compute the coefficients of the elements of a $k$-product, i.e. $A(z)^k$ ...
 A: You have discovered the idea of generating functions! Let's use the standard notation $\left[z^n\right]F(z)$ to denote the coefficient of $z^n$ in $F$. Then we can define the ring of formal power series by the multiplication rule:
$$\left[z^n\right]\left(A(z)B(z)\right) = \sum_{k=0}^{n}\left[z^k\right]A(z)\left[z^{n-k}\right]B(z)$$
If the power series have positive radius of convergence, this corresponds to multiplication of the corresponding functions. It also corresponds to your notion of multiplication of "sets". The (ordinary) generating function of a sequence is the formal power series which has the sequence as its coefficients. For example, lets consider the thing that you somewhat abusively notated as $A(z)=\left\{z^0,z^1,z^2,\ldots\right\}$. This can be represented by a formal power series which happens to be convergent for $|z|<1$:
$$A(z)=1+z+z^2+...=\sum_kz^k=\frac{1}{1-z}$$
which is the generating function of the sequence $1,1,1,\ldots$ The powers of $A(z)$ by your multiplication rule simply give the powers of $A(z)$ as a function, for example:
$$A(z)^2=\frac{1}{(1-z)^2}=\frac{d}{dx}\frac{1}{1-x}=\sum_{k}(k+1)z^k$$
is the generating function of the sequence $1,2,3,\ldots$ In general:
$$A(z)^n=\frac{1}{(1-z)^n}=\sum_{k}\binom{n+k-1}{k}z^k$$ so the coefficients you are looking for are:
$$\left[z^k\right]A(z)^n=\binom{n+k-1}{k}$$
