1
$\begingroup$

I tried to use Generating Function to solve Fibonacci series using following function.

Input:

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

Output:

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

I want to plot this function using graph for a particular range, like as follows:

Input:

RecurrenceTable[{f[n + 2] == f[n + 1] + f[n], f[0] == 0, f[1] == 1}, f, {n, 0, 10}]

Output:

{0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55}

Can I get a list of values using Generating function for recurrence relation to plot it on a graph. This is just an example to understand my problem.

$\endgroup$
4
$\begingroup$
g = GeneratingFunction[Fibonacci@n, n, x]
CoefficientList[Series[g, {x, 0, 10}], x]

(* {0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55} *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.