take a variable input length in _fmpq_poly_inv_series