Number of partitions of a number into distinct parts.

Let $$\pi$$ be the partition of $$n=a_1+a_2+...+a_r$$, where $$a_1\geq a_2 \geq ....\geq a_r\gt0$$. Prove that number of partition $$\pi$$ of $$n$$ with $$a_r=1$$ and $$a_j-a_{j+1}$$ = 0 or 1 for $$1\leq j\leq r-1$$ equals $$p^d (n)$$, i.e the number of partitions of n into distinct parts.

What i have so Far:

I can see that since $$a_r=1$$ and $$a_j-a_{j+1}$$=0 or 1 so putting j = r-1 we have $$a_{r-1}=1$$. Similarly all $$a_j$$ must be 1.This implies that no two $$a_j$$ are equal. Please help

• This sounds very similar to your previous question? Perhaps we/you should first solve the other one before posting new ones immediately. – Dietrich Burde Feb 21 '19 at 15:40
• @Dietrich Burde Any help on either of them would be appreciated – Ayan Shah Feb 21 '19 at 16:06

Set $$\epsilon_j=a_j-a_{j+1} \quad \text{ for } \quad 1\leq j\leq r-1.$$ Then we have
$$a_{r-j}=1+\epsilon_{r-1}+\cdots +\epsilon_{r-j} \quad \text{ for } \quad 1\leq j\leq r-1,$$ so $$n=r+(r-1)\epsilon_{r-1}+ (r-2)\epsilon_{r-2}+\cdots +2\epsilon_2+\epsilon_1$$ defines a partition of $$n$$ with all distinct parts (ignoring the summands with $$\epsilon_j=0$$) and highest part being $$r$$. The correspondence thus defined is bijective: follow the same steps in reverse order.
• I do not understand it: $a_r=1$ and $a_{r-1}-a_r=a_{r-1}-1=0$ or $1$ only implies $a_{r-1}=1$ or $2$. – user135826 Feb 21 '19 at 18:43