2 questions related to generating function of partition function in number theory I am self studying chapter partitions (chapter number-14) from Apostol Introduction to analytic number theory.
I had studied that chapter earlier also and had questions but as I don't have anyone to guide so I couldn't ask anyone about it.
For |x|<1 ,as we have partition function $\prod_{m=1}^{\infty} \frac{1}{1-x^m} =\sum_{n=0}^{\infty} p(n) x^n$ , where p(0)=1.
But then Apostol in table on page 310 writes that generating function for number of partitions of n into parts which are odd is $\prod_{m=1}^{\infty}\frac{1} {1-x^{2m-1}}$ . He doesn't give an explanation and I don't know how to deduce it. Only intutively , I can think of the reasoning that due to odd parts requirements , in the product author is using 2m-1 .
But that can't be said rigorious by any means. Can you please tell how to rigoriously prove it?
Also , in the same table autor writes in number of partitions of n into parts which are unequal the generating function is $\prod_{m=1}^{\infty}(1+x^m)$ . Unfortunately for this part I don't have any intution.
So, Its my humble request can you please provide reasoning behind these 2 cases so that I can understand them . As of now I have no idea on how it works.

A partition into odd parts
\begin{eqnarray*}
N= \underbrace{1+\cdots+1}_{k_1 ones} + \underbrace{3+\cdots+3}_{k_3 threes}+ \cdots. 
\end{eqnarray*}
The generating function
\begin{eqnarray*}
\prod_{n=1}^{\infty} \frac{1}{1-x^{2n-1}}= \left(1+x+\cdots +x^{k_1}+\cdots \right) \left(1+x^3+\cdots +x^{3k_3}+\cdots \right)\cdots 
\end{eqnarray*}
For distinct parts, a part is either not used $1$, or the part $p$ is used $x^p$ ... but the part can only be used once .. so $1+x^p$
The generating function
\begin{eqnarray*}
\prod_{p=1}^{\infty} (1+x^p). 
\end{eqnarray*}
