genfunc - Maple Programming Help

Home : Support : Online Help : Mathematics : Algebra : Rational Expressions : Rational Generating Functions : genfunc/rgf_findrecur

genfunc

 rgf_findrecur
 find recurrence for terms in a sequence

 Calling Sequence rgf_findrecur(K, seq, F, n)

Parameters

 K - positive integer, order of the recurrence seq - list of $2K$ consecutive values from the sequence F - function name for sequence n - name, index variable for the recurrence

Description

 • This function finds the homogeneous linear recurrence with constant coefficients of order K that is satisfied by seq.
 • If seq satisfies a recurrence of order less than K, that recurrence is found.
 • The command with(genfunc,rgf_findrecur) allows the use of the abbreviated form of this command.

Examples

 > $\mathrm{with}\left(\mathrm{genfunc}\right):$
 > $\mathrm{rgf_findrecur}\left(2,\left[1,2,3,4\right],t,n\right)$
 ${t}{}\left({n}\right){=}{2}{}{t}{}\left({n}{-}{1}\right){-}{t}{}\left({n}{-}{2}\right)$ (1)
 > $\mathrm{rgf_findrecur}\left(2,\left[1,2,4,8\right],s,j\right)$
 ${s}{}\left({j}\right){=}{2}{}{s}{}\left({j}{-}{1}\right)$ (2)