= Generalized divisor function
{title2=$d_k(n)=\#\{(a_1,\ldots,a_k)\in\mathbb Z_{>0}^k:a_1\cdots a_k=n\}$}
For an integer $k\ge1$, the generalized divisor function $d_k(n)$ counts ordered factorizations of a positive <integer> $n$ into $k$ positive integer factors. If $n=\prod_p p^{a_p}$, then
$$
d_k(n)=\prod_{p\mid n}\binom{a_p+k-1}{k-1}.
$$
To prove the formula, distribute the exponent $a_p$ among the $k$ factors. The number of nonnegative exponent tuples with that sum is the <stars and bars> count, and different primes can be assigned independently.
Thus $d_1(n)=1$ and $d_2(n)$ is the ordinary <divisor function>. For $12=2^2\cdot3$, $d_3(12)=\binom42\binom32=18$. The ordered condition matters: exchanging two unequal factors changes the counted tuple. Absolute convergence for $\operatorname{Re}s>1$ permits multiplying Dirichlet series, giving $\zeta(s)^k=\sum_{n\ge1}d_k(n)n^{-s}$ and connecting these counts with powers of the <Riemann zeta function>.
Back to article page