Let f be a quasi-homogeneous polynomial with an isolated singularity. We compute the length of the D-modules $Df^c/Df^{c+1}$ generated by complex powers of f in terms of the Hodge filtration on the top cohomology of the Milnor fiber. For 1/f we obtain one more than the reduced genus of the singularity. We conjecture that this holds without the quasi-homogeneous assumption. We also deduce that the aforementioned quotient is nonzero when c is a root of the b-function of f (which Saito recently showed fails to hold in the inhomogeneous case). We obtain these results by comparing these D-modules to those defined by Etingof and the second author which represent invariants under Hamiltonian flow.