Mathematica can generate integer partitions of an integer $N$. For example, IntegerPartitions[4]
quickly gives
{{4}, {3, 1}, {2, 2}, {2, 1, 1}, {1, 1, 1, 1}}
This is nice, but I wish to generate a partition given as $[N_1,N_2,\ldots,]$ with $\sum_{i}i N_i=N$, where $N_i$ counts the number of $i$ in the partition. For example, in the above-mentioned example of $N=4$, we would have
{{0, 0, 0, 1}, {1, 0, 1, 0}, {0, 2, 0, 0}, {2, 1, 0, 0}, {4, 0, 0, 0}}
How could I generate this with Mathematica?