Re: Plot a recurrence relation

• To: mathgroup at smc.vnet.net
• Subject: [mg40171] Re: Plot a recurrence relation
• From: atelesforos at hotmail.com (Orestis Vantzos)
• Date: Tue, 25 Mar 2003 03:02:05 -0500 (EST)
• References: <b5mj14\$rsa\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```a[0]=6;
a[n_]:=(a[n]=a[n-1]/(2n-9));
ListPlot[Array[a,{100},{0}]]

will plot the first 100 terms.

Notice that the definition a[n_]:=a[n]=... stores the value of the
n-th term for efficiency (dynamic programming).
Clear[a] will clear the stored values(and the defintion).

Orestis

"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: Re: Plot a recurrence relation
• Next by Date: Re: List in base 16
• Previous by thread: Re: Plot a recurrence relation
• Next by thread: Re: Plot a recurrence relation