Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

#1: Initial revision by user avatar Derek Elkins‭ · 2022-12-29T02:30:54Z (about 1 year ago)
I don't know some special name for exactly that sum, but it is closely related to what are known as **polynomial coefficients** or **extended binomial coefficients**. These are often written as ${n \choose j}_{k+1}$ and are defined indirectly via: $$\left(\sum_{i=0}^k x^i\right)^n = \sum_{j=0}^{nk} {n \choose j}_{k+1} x^j$$ with ${n \choose 0}\_0 = 1$ and ${n \choose j\}_{k+1} = 0$ for $j\notin \\{0,\dots,nk\\}$.

[Polynomial coefficients and distribution of the sum of discrete uniform variables](https://www.researchgate.net/profile/Camila-Caiado/publication/228457326_Polynomial_coefficients_and_distribution_of_the_sum_of_discrete_uniform_variables/links/00b7d53501e1ea6fbc000000/Polynomial-coefficients-and-distribution-of-the-sum-of-discrete-uniform-variables.pdf) by Caiado, C.C.S. and Rathie, P.N. provides this definition and a recurrence relation to compute this number. As the title suggests, it also provides a direct solution to your probability problem. If $Y = \sum_{i=0}^n X_i$ where each $X_i$ is a discrete random variable uniformly sampled from $\{0,\dots,k\}$, then $$P(Y=y) = \frac{1}{(k+1)^n}{n \choose y}_{k+1}$$ This is the probability that rolling $n$ dice with values from $0$ to $k$ produces the sum $y$. The more usual case of dice with values $1$ to $k$ can be reproduced by noting this is equivalent to rolling $n$ dice with values from $0$ to $k-1$ to produce the sum $y-n$.

The aforementioned paper gives a summation expression in terms of gamma functions which probably does reduce to your sum, but a clearer expression is in [Restricted Weighted Integer Compositions and Extended Binomial Coefficients](https://cs.uwaterloo.ca/journals/JIS/VOL16/Eger/eger6.pdf) by Steffen Eger. Table 1 in the conclusion (page 22) list various binomial identities and the corresponding extended binomial identities derived in that paper. (See also equation 15 in Example 33.) One of which is: $${k \choose n}_{l+1} = \sum_{j\geq 0}(-1)^j{k \choose j}{n + k - (l + 1)j - 1 \choose k-1}$$

Matching your notation and performing the adjustment as above gives:
$${z \choose n-z}_a = \sum_{k\geq 0}(-1)^k{z \choose k}{n - ak - 1 \choose z-1}$$
This is almost exactly the sum you wrote except you have $(n-a)(k-1)$ where I have $n - ak - 1$. Checking the $n=3$ and $a=z=2$ case, the above formula gives the correct result of $2$ whereas your variant is $0$, so I'm going to assume that was just a typo.

Just for completeness, for the second binomial coefficient factor to be non-zero we need $n - ak - 1 \geq z - 1$ or $k \leq (n-z)/a$ giving $\lfloor (n-z)/a \rfloor$ as an upperbound to the summation assuming the other numbers make sense, i.e. that $z \leq n \leq az$.