Give a proof using Generating functions: let $n$ and $k$ be positive integers with $k\leq n$. Show that the number of partitions ($\lambda$) of $n$ in which $\lambda_1 = k$ is equal to the number of partitions $q$ of $r$ where $r=n-k$ in which $q_i\leq k \ \forall i$
I understand that this can be done easily using a bijection and Ferrer's diagrams and adding a top row of size $k$ (for $q$) and removing a top row of size $k$ (to get $\lambda$), but I can't find out how to do this using generating functions.