I tried my own way and got something slightly different - more on that in a second. Let $c(m,n,k)$ be the number of integer compositions with largers part $\le m$ and exactly $k$ parts. Then
$$\sum_n c(m,n,k)x^n=\left.\sum_{p_1=1}^m\cdots\sum_{p_k=1}^m x_1^{p_1}\cdots x_k^{p_k}\right|_{x_1=x_2=\cdots=x_k=x}=\left(x\frac{1-x^m}{1-x~~~}\right)^k$$
and therefore
$$\sum_n c(m,n)x^n=\sum_n\left[\sum_{k\ge1}c(m,n,k)\right]x^n=\sum_{k\ge1}\sum_nc(m,n,k)x^n$$
$$=\sum_{k\ge1}\left(x\frac{1-x^m}{1-x~~~}\right)^k=\frac{\displaystyle x\frac{1-x^m}{1-x~~~}}{\displaystyle 1-x\frac{1-x^m}{1-x~~~}}=\frac{x(1-x^m)}{1-2x+x^{m+1}}.$$
Note that
$$\frac{x(1-x^m)}{1-2x+x^{m+1}}=\frac{1-x}{1-2x+x^{m+1}}-1,$$
so the given answer and mine differ merely by $1$. What's the deal? The reason we need to add $1$ I presume is that $n=0$ has one integer composition, namely the empty set (it is the empty sum). At least that's what OEIS says, I haven't actually seen the textbook's definition/convention for $0$.
The following lemma should help you out (or at least partially) for small cases of $n$:
The number of compositions of n into odd parts equals the number of compositions
of n + 1 into parts greater than one.
proof: We'll construct a bijection. We'll start with a composition of $n$ of length $l$, $n=a_1+a_2+\dots+a_l$. We will represent this composition with a binary sequences of $n-l-1$ 0's and $l-1$ 1's, as follows:
$a_1-1$ zeros, $1$, $a_2-1$ zeros, $1$, $\dots$ $a_l-1$ zeros
(Thus, for example, the associated binary sequence to $13=3+1+5+3+1$ is $001100001001$)
Notice that a composition of $n$ where each $a_i$ is odd, then the associated binary sequence must have strings of zeros of even length. And thus if we take the conjugate composition (Which is, turn every zero in the corresponding binary sequence of the composition into a 1 and vice versa), we obtain a composition of $n$ of lenth $n-l+1$ with strings of $1$'s of even length. Denote this conjugate composition by $n-l+1=c_1+c_2+\dots+c_{n+l-1}$
(in our example, we have the conjugate composition $13=1+1+3+1+1+1+2+1+2$)
Next, we define $b_i=c_{2i-1}+c_{2i}$ for all $1\leq i \leq (n-l)/2$ and $b_{\frac{n-l}{2}+1}=c_{n-l+1}+1$ (notice how $n$ and $l$ must have the same parity)
Then $n+1=b_1+b_2+\dots +b_{\frac{n-l}{2}}+b_{\frac{n-l}{2}+1}$ is a composition of $n+1$ and length $\frac{n-l}{2}+1$, and moreover, all $b_i>1$!
(In our example: $14=2+4+2+3+3$)
To conclude the bijective relation, we have to check if all steps are reversible, but this is easy: Begin with a composition of n + 1 into parts greater
than one, reduce the last part by 1, split each part $j$ (other than the last part) into the pair of parts $j − 1, 1$, and calculute the conjugate composition of the precedent composition. $\Box$
in the following article, Cayley showed that the number of compositions of n + 1 into parts greater than one equals the $n$th Fibonacci number $F_n$.
A. Cayley, Theorems in trigonometry and on partitions, Collected Mathematical Papers, vol. 10, 16.
Quite surprisingly, it follows that the number of compositions into odd parts equals the $n$'th fibonnaci number.
Which is suggested in this OEIS entry: http://oeis.org/A000045:
"$F(n) =$ number of compositions of n into odd parts; e.g., $F_6$ counts 1+1+1+1+1+1, 1+1+1+3, 1+1+3+1, 1+3+1+1, 1+5, 3+1+1+1, 3+3, 5+1. - Clark Kimberling, Jun 22 2004"
Best Answer
Suppose that $$x_1 + x_2 + \cdots + x_k = n \tag{1}$$ where $x_1, x_2, \ldots, x_k$ are odd positive integers. Then for $1 \leq j \leq k$, we can write $x_j = 2y_j + 1$, where $y_j$ is a nonnegative integer. Substitution into equation 1 yields \begin{align*} 2y_1 + 1 + 2y_2 + 1 + \cdots + 2y_k + 1 & = n\\ 2y_1 + 2y_2 + \cdots + 2y_k & = n - k \end{align*} If $n - k$ is an odd integer, such a composition is not possible. On the other hand, if $n - k$ is an even integer, then $$y_1 + y_2 + \cdots + y_k = \frac{n - k}{2} \tag{2}$$ is an equation in the nonnegative integers. A particular solution of equation 2 corresponds to the placement of $k - 1$ addition signs in a row of $(n - k)/2$ ones. Thus, the number of possible compositions of $n$ into odd parts is $$\binom{\frac{n - k}{2} + k - 1}{k - 1} = \binom{\frac{n + k - 2}{2}}{k - 1} $$ since we must choose which $k - 1$ of the $(n + k - 2)/2$ symbols ($(n - k)/2$ ones and $k - 1$ addition signs) will be addition signs.