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.
type⁡n−1⁢23⁢n+1,ratseq⁡n
true
type⁡n⁢2n+3−n3,ratseq⁡n
type⁡2n2,ratseq⁡n
false
type⁡1m,ratseq⁡m
See Also
genfunc
genfunc/rgf_encode
genfunc/rgf_expand
Download Help Document