Computation of Hansen coefficients