Previous Up Next

6.56.10  Finding linear recurrences: reverse_rsolve

The reverse_rsolve command finds a linear recurrence relation given the first few terms.

In other words, reverse_rsolve solves the linear system of n equations:

xn*vn+⋯+x0*v0=
xn*vn+k+⋯+x0*vk=
xn*v2*n−1+⋯+x0*vn−1=0

The matrix A of the system has n rows and n+1 columns:

A=






vnv00
  ⋮ 
vn+kvk0
  ⋮ 
v2n−1v2vn−10






reverse_rsolve returns the list x=[xn,…,x1,x0] with xn=1 and x is the solution of the system Ax=0.


Examples:


Previous Up Next