In the appendix of the book http://www.math.upenn.edu/~wilf/DownldGF.html, page 194, the author mentioned that in Mma 2.0 (very old. :P), there is the function which can get the generating functions directly from recurrence relationship, like the example given therein:
GeneratingFunction[{f[n+2]==f[n+1]+f[n], f[0]==0, f[1]==1},f[n],n,x]
But the same function does not seem to do the kind of job anymore in mma 7.0/8.0. Does anyone know how to get the equivalent function? many thanks.
The GeneratingFunction scope has changed. Here you may find the obsolete legacy documentation (by the middle of the document).
Now you can do the same, but in two steps. First solve the recurrence relation with RSolve and the find the Generating Function. Like this:
GeneratingFunction[
RSolve[{f[n + 2] == f[n + 1] + f[n], f[0] == 0, f[1] == 1}, f[n], n],
n, x]
Out
{{GeneratingFunction[f[n], n, x] -> -(x/(-1 + x + x^2))}}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With