'Multiplies two Operators and returns another
RecurrenceOperator instance using the commutation rule
Sn * a(n) = a(n + 1) * Sn'

def __mul__(self, other):

    listofself = self.listofpoly
    base = self.parent.base
    if (not isinstance(other, RecurrenceOperator)):
        if (not isinstance(other, self.parent.base.dtype)):
            listofother = [self.parent.base.from_sympy(sympify(other))]
        else:
            listofother = [other]
    else:
        listofother = other.listofpoly
    def _mul_dmp_diffop(b, listofother):
        if isinstance(listofother, list):
            sol = []
            for i in listofother:
                sol.append((i * b))
            return sol
        else:
            return [(b * listofother)]
    sol = _mul_dmp_diffop(listofself[0], listofother)
    def _mul_Sni_b(b):
        sol = [base.zero]
        if isinstance(b, list):
            for i in b:
                j = base.to_sympy(i).subs(base.gens[0], (base.gens[0] + S(1)))
                sol.append(base.from_sympy(j))
        else:
            j = b.subs(base.gens[0], (base.gens[0] + S(1)))
            sol.append(base.from_sympy(j))
        return sol
    for i in range(1, len(listofself)):
        listofother = _mul_Sni_b(listofother)
        sol = _add_lists(sol, _mul_dmp_diffop(listofself[i], listofother))
    return RecurrenceOperator(sol, self.parent)
