The divisor function $d_k(n)$ satisfies the following two relationships for $k\in \mathbb{Z}$ where for $k\ge 2$ $d_k(n)$ counts the number of ways that $n$ can be written as a product of $k$ numbers.
(1) $\quad D_k(x)=\sum\limits_{n\le x} d_k(n)=\sum\limits_{m\,n\le x} d_k-1(n)$
(2) $\quad\sum\limits_n d_k(n)\,n^{-s}=\zeta^k(s)\,,\quad\Re(s)>1$
This question is related to the following generalized identity for the number of divisors function which is defined on page 421 of "The Riemann Zeta-Function Theory and Applications" by Aleksandar Ivic and the basis of the MathOverflow question "Can the generalized divisor summatory function $D_z$ be expressed explicitly in terms of Zeta Zeros?".
(3) $\displaystyle \quad d_z(n)=\prod_{p^\alpha|n}\frac{(z)(z+1)..(z+\alpha-1)}{\alpha!}$
(4) $\quad D_z=\sum\limits_{n\le x}d_z(n)$
My understanding is that $d_z(n)$ is supposed to extend the divisor function $d_k(n)$ to $z\in\mathbb{C}$ but I've primarily been investigating and attempting to verify the correctness of formula (3) for $z\in \mathbb{Z}$. Formula (3) above for $d_z(n)$ seems to be correct for $z\in\{-1,0,1\}$ but not for other integer values of $z$. Some of the results are summarized in (5) to (9) below where formula (3) for $d_z(n)$ seems to validate as correct in (6) to (8) but not in (5) or (9).
(5) $\quad z=-2:\ \sum\limits_n \frac{d_z(n)}{n^s}\ne\frac{1}{\zeta^2(s)}$
(6) $\quad z=-1:\ d_z(n)=\mu(n)$
(7) $\quad z=0:\ d_z(n)=\delta_{1,n}$
(8) $\quad z=1:\ d_z(n)=1$
(9) $\quad z=2:\ d_z(n)\ne\sigma_0(n)$
The following formula illustrates the definition I'm using to evaluate formula (3) for $d_z(n)$ in Mathematica where $\Omega(d)$ is the number of primes in the factorization of $d$ counting multiplicities.
(10) $\quad d(\text{z$\_$},\text{n$\_$})\text{:=}\prod\limits_d^{\text{Select}[\text{Divisors}[n],\text{PrimePowerQ}[\text{$\#$1}]\&]}\frac{1}{\Omega (d)!}\prod\limits_{i=0}^{\Omega(d)-1}(z+i)$
Question: Is formula (3) for $d_z(n)$ supposed to be valid for all $z$? If so, what is the source of my validation errors? If not, in what sense is formula (3) a generalized formula and what is the range of values of $z$ for which formula (3) is valid?