I've been trying to derive this formula for quite some time now with little progress.
I've seen concepts such as Pascal's pyramids and Pascal's simplices mentioned throughout my research; however, I doubt their significance to the formula.
The most promising outlet I've seen are the coefficients that come from the expansion of $(1 + x^2 + x^3 +\dots + x^{r - 1})^n$ [for various values of $r$ and all values of $n$].
I've seen somewhat similar questions posted on Math SE before, but I'm struggling to find an answer that provides an accurate formula as well as a general breakdown of how it was achieved.
If someone could help, that would be great!