MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Plot a recurrence relation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg40165] Re: Plot a recurrence relation
  • From: "Kevin J. McCann" <kjm@KevinMcCann>
  • Date: Tue, 25 Mar 2003 03:01:33 -0500 (EST)
  • References: <b5mj14$rsa$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Here is some code to calculate it

a[0]=6;
a[n_]:=a[n]=a[n-1]/(2n-9)
TableForm[tbl=Table[{n,a[n]},{n,0,10}]]
ListPlot[tbl];

The construct a[n_]:=a[n]=... keeps a[n] in memory after the first time it
is called so that you do not recacluate all of the a[n] each time.

Kevin

"David" <davidol at hushmail.com> wrote in message
news:b5mj14$rsa$1 at smc.vnet.net...
> How can I get mathematica to plot a sequence that's defined recursively
e.g.
>
> a_0 = 6
> a_(n+1) = a_n / (2n - 7)
>
> Cheers.
>
>
>




  • Prev by Date: proper way to manipulate lists?
  • Next by Date: Re: Plot a recurrence relation
  • Previous by thread: Re: Plot a recurrence relation
  • Next by thread: Re: Plot a recurrence relation