ratseq - Maple Help

type/ratseq

tests an expression to determine if it defines a sequence encoded by a rational generating function

 Calling Sequence type(expr, 'ratseq'(n))

Parameters

 expr - expression for the nth term in a sequence n - name, index variable of the sequence

Description

 • Determines if the sequence whose nth term is expr has a rational generating function. Such sequences are constructed from polynomials in n and constants to a linear power of n using the operations addition, subtraction, and multiplication.

Examples

 > $\mathrm{type}\left(\left(n-1\right){2}^{3n+1},'\mathrm{ratseq}'\left(n\right)\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{type}\left({\left(n{2}^{n}+3-n\right)}^{3},'\mathrm{ratseq}'\left(n\right)\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{type}\left({2}^{{n}^{2}},'\mathrm{ratseq}'\left(n\right)\right)$
 ${\mathrm{false}}$ (3)
 > $\mathrm{type}\left(\frac{1}{m},'\mathrm{ratseq}'\left(m\right)\right)$
 ${\mathrm{false}}$ (4)