class_docstr: The Recurrence Operators are defined by a list of polynomials
  in the base ring and the parent ring of the Operator.
  
  Explanation
  ===========
  
  Takes a list of polynomials for each power of Sn and the
  parent ring which must be an instance of RecurrenceOperatorAlgebra.
  
  A Recurrence Operator can be created easily using
  the operator `Sn`. See examples below.
  
  Examples
  ========
  
  >>> from sympy.holonomic.recurrence import RecurrenceOperator, RecurrenceOperators
  >>> from sympy import ZZ
  >>> from sympy import symbols
  >>> n = symbols('n', integer=True)
  >>> R, Sn = RecurrenceOperators(ZZ.old_poly_ring(n),'Sn')
  
  >>> RecurrenceOperator([0, 1, n**2], R)
  (1)Sn + (n**2)Sn**2
  
  >>> Sn*n
  (n + 1)Sn
  
  >>> n*Sn*n + 1 - Sn**2*n
  (1) + (n**2 + n)Sn + (-n - 2)Sn**2
  
  See Also
  ========
  
  DifferentialOperatorAlgebra
class_docstr_tok: ["The","Recurrence","Operators","are","defined","by","a","list","of","polynomials","in","the","base","ring","and","the","parent","ring","of","the","Operator",".","Explanation","===========","Takes","a","list","of","polynomials","for","each","power","of","Sn","and","the","parent","ring","which","must","be","an","instance","of","RecurrenceOperatorAlgebra",".","A","Recurrence","Operator","can","be","created","easily","using","the","operator","`","Sn","`",".","See","examples","below",".","Examples","========",">",">",">","from","sympy.holonomic.recurrence","import","RecurrenceOperator",",","RecurrenceOperators",">",">",">","from","sympy","import","ZZ",">",">",">","from","sympy","import","symbols",">",">",">","n","=","symbols","(","'n","'",",","integer=True",")",">",">",">","R",",","Sn","=","RecurrenceOperators","(","ZZ.old_poly_ring","(","n",")",",","'Sn","'",")",">",">",">","RecurrenceOperator","(","[","0",",","1",",","n","*","*","2","]",",","R",")","(","1",")","Sn","+","(","n","*","*","2",")","Sn","*","*","2",">",">",">","Sn","*","n","(","n","+","1",")","Sn",">",">",">","n","*","Sn","*","n","+","1","-","Sn","*","*","2","*","n","(","1",")","+","(","n","*","*","2","+","n",")","Sn","+","(","-n","-","2",")","Sn","*","*","2","See","Also","========","DifferentialOperatorAlgebra"]
code: def __init__(self, list_of_poly, parent):
      # the parent ring for this operator
      # must be an RecurrenceOperatorAlgebra object
      self.parent = parent
      # sequence of polynomials in n for each power of Sn
      # represents the operator
      # convert the expressions into ring elements using from_sympy
      if isinstance(list_of_poly, list):
          for i, j in enumerate(list_of_poly):
              if isinstance(j, int):
                  list_of_poly[i] = self.parent.base.from_sympy(S(j))
              elif not isinstance(j, self.parent.base.dtype):
                  list_of_poly[i] = self.parent.base.from_sympy(j)
  
          self.listofpoly = list_of_poly
      self.order = len(self.listofpoly) - 1
  
imports: from sympy.core.singleton import S
  from sympy.core.symbol import Symbol, symbols
  from sympy.printing import sstr
  from sympy.core.sympify import sympify
label_desc: Use image node_id 1 to create a new RecurrenceOperator object  with example: obj = RecurrenceOperator(list_of_poly, parent)