This is because (the sum of a geometric progression).

This is a little trickier.

Surely if you understand 1, 2, 4, 8, 16, ... --> 1 + 2z + 4z^2 + 8z^3 + ... --> 1/(1-2z), you should understand this. Note that (1 + z)^2=1 + 2z + z^2.

The idea to use generating functions for such problems comes from how coefficients are calculated when two possibly infinite sums are multiplied. In , every term from the first sum is multiplied by every term of the second sum. The powers of z of the two terms are added. This corresponds to combining or or ... objects of the first kind and or or ... objects of the second kind in every possible way. In the product, what is the coefficient of some ? Every way to select a from the first sum and from the second sum so that contributes 1 to that coefficient. Therefore, the coefficient of in the product is the number of ways to select n objects of the two kinds.

That's 1 + x^2 + x^4 + ... The powers are even natural numbers. The text above explains why it is the powers that matter.

Again, this is the sum of a geometric progression. This equality can also be verified directly by multiplying (1 + x + x^2 + x^3 + x^4) and (1 - x).