I'm a little dubious about that differentiation identity:
\( \frac{d}{dz} \sum_{n=0}^{z-1} f(n) = \sum_{n=0}^{z-1} f'(n) \)
.
Consider the very simple case \( f(z) = z^2 \). The derivative is \( f'(z) = 2z \). For this simple polynomial we can use Faulhaber's formula and that gives us
\( \sum_{n=0}^{z-1} f'(n) = \sum_{n=0}^{z-1} 2z = z(z-1) = z^2 - z \).
Integrating that, which should give \( \sum_{n=0}^{z-1} n^2 \), gives \( \frac{z^3}{3} - \frac{z^2}{2} \), yet \( \sum_{n=0}^{z-1} n^2 = \frac{z^3}{3} - \frac{z^2}{2} + \frac{z}{6} \), and these differ by a non-constant amount. Likewise, differentiating the latter expression for the sum gives \( \frac{d}{dz} \sum_{n=0}^{z-1} n^2 = z^2 - z + \frac{1}{6} \ne z^2 - z \).
But looking at this, the derivative of the sum does just have a constant shift, so perhaps what we should really say is
\( \frac{d}{dz} \sum_z f(z) = \sum_z \frac{d}{dz} f(z) \)
up to a constant, which, when integrated, yields a linear term, where this is just indefinite continuum sum, not definite.
\( \frac{d}{dz} \sum_{n=0}^{z-1} f(n) = \sum_{n=0}^{z-1} f'(n) \)
.
Consider the very simple case \( f(z) = z^2 \). The derivative is \( f'(z) = 2z \). For this simple polynomial we can use Faulhaber's formula and that gives us
\( \sum_{n=0}^{z-1} f'(n) = \sum_{n=0}^{z-1} 2z = z(z-1) = z^2 - z \).
Integrating that, which should give \( \sum_{n=0}^{z-1} n^2 \), gives \( \frac{z^3}{3} - \frac{z^2}{2} \), yet \( \sum_{n=0}^{z-1} n^2 = \frac{z^3}{3} - \frac{z^2}{2} + \frac{z}{6} \), and these differ by a non-constant amount. Likewise, differentiating the latter expression for the sum gives \( \frac{d}{dz} \sum_{n=0}^{z-1} n^2 = z^2 - z + \frac{1}{6} \ne z^2 - z \).
But looking at this, the derivative of the sum does just have a constant shift, so perhaps what we should really say is
\( \frac{d}{dz} \sum_z f(z) = \sum_z \frac{d}{dz} f(z) \)
up to a constant, which, when integrated, yields a linear term, where this is just indefinite continuum sum, not definite.

