Gaussian multinomial coefficient (source code)

= Gaussian multinomial coefficient
{c}
{title2=$\binom{n}{k_1,\ldots,k_r}_q$}

= q-multinomial coefficient
{synonym}

For nonnegative $k_1,\ldots,k_r$ with sum $n$, the <Gaussian multinomial coefficient> is
$$
\binom{n}{k_1,\ldots,k_r}_q=\prod_{j=1}^r\binom{n-\sum_{i<j}k_i}{k_j}_q.
$$
It is a <polynomial> in $q$ and at $q=1$ gives the ordinary <multinomial coefficient>. For a <prime power> $q$, it counts <flags> in $\mathbb F_q^n$ whose successive <dimension> increments are $k_1,\ldots,k_r$: choose each new subspace in the quotient by the previous one, using <Gaussian binomial coefficients>. For $(k_1,k_2,k_3)=(1,1,1)$, the value is $(1+q+q^2)(1+q)$, giving 21 complete flags over $\mathbb F_2$.