How to get the generation function automatically in math

In the appendix to the book http://www.math.upenn.edu/~wilf/DownldGF.html , p. 194, the author mentioned that in Mma 2.0 (very old .: P), there is a function that can get generating functions directly from repetition relationships, as an example given in it:

GeneratingFunction[{f[n+2]==f[n+1]+f[n], f[0]==0, f[1]==1},f[n],n,x]

But the same function no longer works in mma 7.0 / 8.0. Does anyone know how to get an equivalent function? many thanks.

+3
source share
1 answer

Changed the area GeneratingFunction. Here you may findoutdated documentation (in the middle of the document).

, . RSolve . :

GeneratingFunction[
 RSolve[{f[n + 2] == f[n + 1] + f[n], f[0] == 0, f[1] == 1}, f[n], n], 
n, x]  

{{GeneratingFunction[f[n], n, x] -> -(x/(-1 + x + x^2))}}
+4

Source: https://habr.com/ru/post/1790269/


All Articles