If you partition $n$ into exactly $k$ distinct parts, then the $i$-th smallest part must be at least $i$, therefore strictly larger than $i-1$. So you can start reserving $i-1$ units for the $i$-th smallest part, which amount to a total of $\binom k2$ reserved units. Then (assuming $n\geq\binom{k+1}2$ without which no solution is of course possible) you can find a partition of $n-\binom k2$ into exactly $k$ parts, and then add the $i-1$ reserved units to the $i$-th smallest part of that partition (it may be ex-aequo with another part, but after these additions it will be distinct from any other parts, and exactly $i$-th smallest among them). This gives every partition of $n$ into exactly $k$ distinct parts exactly once.
The reason for not reserving $i$ parts is than you would then need a partition of $n-\binom{k+1}2$ into at most $k$ parts, and this case did not occur in the list of cases you said you knew how to handle. But in any case, the number of ways to partition any $m$ into at most $k$ parts is equal to the number of ways to partition $m+k$ into exactly $k$ parts, by a similar argument (reserve one unit for each part).
Note that
$$x^k\prod_{i=1}^k\frac1{1-x^i}=\left(\prod_{i=1}^{k-1}\frac1{1-x^i}\right)\cdot\frac{x^k}{1-x^k}\tag{1}$$
is the product of the following series:
$$\begin{align*}
&1+x+x^2+x^3+x^4+\ldots+x^n+\ldots\\
&1+x^2+x^4+x^6+x^8+\ldots+x^{2n}+\ldots\\
&1+x^3+x^6+x^9+x^{12}+\ldots+x^{3n}+\ldots\\
&1+x^4+x^8+x^{12}+x^{16}+\ldots+x^{4n}+\ldots\\
&\qquad\qquad\qquad\vdots\\
&1+x^{k-1}+x^{2(k-1)}+x^{3(k-1)}+x^{4(k-1)}+\ldots+x^{(k-1)n}+\ldots\\
&x^k+x^{2k}+x^{3k}+x^{4x}+x^{5k}+\ldots+x^{kn}+\ldots
\end{align*}$$
Each term of the product will therefore have the form
$$x^{n_1}x^{2n_2}x^{3n_3}\ldots x^{kn_k}=x^{n_1+2n_2+3n_3+\ldots+kn_k}\;,$$
where $n_1,n_2,\ldots,n_{k-1}\ge 0$, and $n_k\ge 1$. This term is $x^n$ if and only if
$$n_1+2n_2+3n_3+\ldots+kn_k=n\;,\tag{2}$$
in which case it corresponds to a partition of $n$ into $n_1$ parts of size $1$, $n_2$ parts of size $2$, and so on. Since $n_k\ge 1$, this partition must have a largest part of size $k$. Conversely, each partition of $n$ with largest part $k$ yields a solution to $(2)$ with $n_k\ge 1$. Thus, the coefficient of $x^n$ in $(1)$ is precisely the number of partitions of $n$ with largest part $k$.
Now look at the Ferrers diagram of any partition of $n$ with largest part $k$. Flip that diagram over its main diagonal, so that the top row becomes the first column and vice versa. You now have the Ferrers diagram of a partition of $n$ with exactly $k$ parts; this partition is the conjugate of the original partition. Every partition of $n$ into exactly $k$ parts arises in this way from a partition of $n$ with largest part $k$, so there are exactly as many partitions of $n$ into exactly $k$ parts as there are with largest part $k$: the former are the conjugates of the latter (and vice versa). Thus, the coefficient of $x^n$ in $(1)$ is also the number of partitions of $n$ into exactly $k$ parts.
Best Answer
$p(n,k)$ is the number of ways to partition $n$ into $k$ parts. It is the same as the number of different ways of placing $n$ objects into $k$ pots. Firstly put $1$ object in each pot. Total $k$ objects have been put and now we have to put remaining $n-k$ objects into $k$ pots. Hence, $$ p(n,k)=p(n-k,1)+p(n-k,2)+\cdots+p(n-k,k-1)+p(n-k,k)$$ Also observe that, $$ p(n-1,k-1)=p(n-k,1)+p(n-k,2)+\cdots+p(n-k,k-1)$$ From the above two equations, we conclude: $$p(n,k)=p(n-1,k-1)+p(n-k,k)$$