I want to graph a sequence g[n]
.
I tried:
{g[n_] := FindSequenceFunction[{5, 11, 19, 29}, n]
Plot[g[n],n,1,99999]}
But it did not work.
I want to graph a sequence g[n]
.
I tried:
{g[n_] := FindSequenceFunction[{5, 11, 19, 29}, n]
Plot[g[n],n,1,99999]}
But it did not work.
You forgot parentheses in the second argument of Plot
:
g[n_] = FindSequenceFunction[{5, 11, 19, 29}, n] ;
Plot[g[n], {n, 1, 99999}]
Notice that I changed :=
to =
such that the sequence function is found once, rather than every single time that Plot
wants to evaluate g
at a new sample point.
In order to plot for natural numbers only, use
DiscretePlot[g[n], {n, 1, 49}]