On Feb 10, 9:54 am, Nathann Cohen <nathann.co...@gmail.com> wrote:
> I just learnt about the "rsolve" function from Maple, which seems to
> give the formula of sequences defined by recurrence.. Is there a
> similar function in Sage ?

sympy has rsolve

>
> For example, how could I have Sage give me the general formula of
> fibonacci's sequence ? :-)

I wasn't able to do that one (bug or i don't understand what i'm
doing), but let me quote the doctest:

from sympy import *
>>> y = Function('y')
>>> n = Symbol('n', integer=True)
>>> f = (n-1)*y(n+2) - (n**2+3*n-2)*y(n+1) + 2*n*(n+1)*y(n)
>>> rsolve(f, y(n))
C0*n! + C1*2**n
>>> rsolve(f, y(n), { y(0):0, y(1):3 })
-3*n! + 3*2**n

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to