I'm new with Maple and want to define a recurrence relation. I want to 1) have Maple solve it to the explicit formula 2)have Maple output a few evaluations of it for various values of n
For example if I have $a_n=2a_{n-1}+3a_{n-2}$ with $a_0=1$ and $a_1=2$ how would I use Maple to solve for an explicit formula and output the evaluated $a_1, a_2, a_3, a_4$?
In terms of Maple commands, do I want to define a function or does a recurrence sequence have it's on "type"? I know I want to use rsolve but I haven't got the commands right. Could someone please give me an example?
EDIT: the given solutions don't seem to work if you do a second recurrence realtion, that is having $a(n)$ equal to something else and try solving it.
A:= rsolve({a(n)=2*a(n-1)+3*a(n-2), a(0)=1, a(1)=2}, a(n), makeproc):why do you have:instead of;at the end? Also what difference does it make that the second argument isa(n)instead of justa? – Celeritas Dec 01 '13 at 01:19aora(n)as the second argument makes no difference as far as I can tell. I was not aware that it could be abbreviated toa. – Carl Love Dec 01 '13 at 03:25