Problem on number of ways of writing $n$ as a sum of distinct integers vs a sum of odd integers I found this problem while doing a few problems on partitions of an integer:
Prove that the number of ways of writing $n$ as a sum of distinct positive integers is equal to the number of ways of writing $n$ as a sum of odd positive integers.
Attempt at solution:
I tried to perform some manipulations on the generating function for the partitions of $n$ to get the latter, but could not do so. 

I think this was proved by Euler.
The number of partitions of $n$ as a sum of odd positive integers is the coefficient of the $x^n$ in the expansion of :
$$\frac{1}{(1-x)(1-x^3)(1-x^5)(1-x^7)\dots} $$
and the number of ways of writing $n$ as a sum of distinct positive integers is the coefficient of $x^n$ in 
$$(1+x)(1+x^2)(1+x^3)\dots$$
Trivially we have $\frac{1}{(1-x)(1-x^3)(1-x^5)(1-x^7)\dots} = \frac{1-x^2}{1-x} \cdot \frac{1-x^4}{1-x^2} \cdot \frac{1-x^6}{1-x^3} \cdot \frac{1-x^8}{1-x^4}\dots$
$$ = (1+x)(1+x^2)(1+x^3)\dots$$
