Polynomials arising in factoring generalized Vandermonde determinants: an algorithm for computing their coefficients