[Math] compositions of $n $ into odd parts

combinatorics

Find the number of compositions of n into odd parts.

attempt: Recall a composition of n is of n is a way of expressing n as an ordered sum of positive integers, called the parts of the composition.
Then we know that for all positive integers $n$ and $k$, the number of compositions of $n$ into $k$ parts is $n-1 \choose k-1$. And for all positive numbers $n$ , the number of all compositions of $n$ is $2^{n-1} $=$ \Sigma_{k=1}^n$ $n-1 \choose k-1$. I don't really know how to approach this problem.

could someone please provide some feedback? Thank you.

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.

Related Question