The Full Question
(a) What is the generating function for the number of integer compositions with $2$ parts?
(b) What is the generating function for the number of integer compositions with $3$ parts?
(c) What is the generating function for the number of integer compositions with $2$ or $3$ parts?
My Work
Part A
Let $n =$ the number we are finding compositions for
We are trying to solve all the solutions for $x_1 + x_2 = n$ where $ x_1,x_2\geq 1$ and $n\geq2$
The general case for this is $n-1$
Which means our generating function is given by $\sum_{n=2}^{\infty}(k-1)x^{k}$
Part B
Same thought process as part A
Part C
$C = A \cup B$ so $C(x)=A(x)+B(x)$
My Problem
I can't think of a closed form of the generating function I came up with in part A. It doesn't seem to match any of the basic generating functions I was given (These kind of problems usually reduce to one of those). Does anyone know a closed form for that GF?
The Generating Functions I know
Note: Since your work is quite ok, we concentrate on your question and add a small remark to part B.)
Comment:
In (1) we write $(n+1)$ as binomial coefficient $\binom{n+1}{n}$
In (2) we use the identity $\binom{-k}{n}=\binom{k+n-1}{k}(-1)^n$
In (3) we use the generating function according to your table entry 8.)
In case $k=3$ we obtain therefore the generating function $$\left(\frac{x}{1-x}\right)^3$$