type/ratseq
tests an expression to determine if it defines a sequence encoded by a rational generating function
Calling Sequence
Parameters
Description
Examples
type(expr, 'ratseq'(n))
expr
-
expression for the nth term in a sequence
n
name, index variable of the sequence
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.
typen−123n+1,ratseqn
true
typen2n+3−n3,ratseqn
type2n2,ratseqn
false
type1m,ratseqm
See Also
genfunc
genfunc/rgf_encode
genfunc/rgf_expand
Download Help Document