'Computes roots of the Indicial equation.'

def _indicial(self):

    if (self.x0 != 0):
        return self.shift_x(self.x0)._indicial()
    list_coeff = self.annihilator.listofpoly
    R = self.annihilator.parent.base
    x = self.x
    s = R.zero
    y = R.one
    def _pole_degree(poly):
        root_all = roots(R.to_sympy(poly), x, filter='Z')
        if (0 in root_all.keys()):
            return root_all[0]
        else:
            return 0
    degree = [j.degree() for j in list_coeff]
    degree = max(degree)
    inf = (10 * (max(1, degree) + max(1, self.annihilator.order)))
    deg = (lambda q: (inf if q.is_zero else _pole_degree(q)))
    b = deg(list_coeff[0])
    for j in range(1, len(list_coeff)):
        b = min(b, (deg(list_coeff[j]) - j))
    for (i, j) in enumerate(list_coeff):
        listofdmp = j.all_coeffs()
        degree = (len(listofdmp) - 1)
        if ((((- i) - b) <= 0) and (((degree - i) - b) >= 0)):
            s = (s + (listofdmp[((degree - i) - b)] * y))
        y *= (x - i)
    return roots(R.to_sympy(s), x)
