Re: simple sequence problem

*To*: mathgroup at smc.vnet.net*Subject*: [mg74432] Re: [mg74402] simple sequence problem*From*: Bob Hanlon <hanlonr at cox.net>*Date*: Wed, 21 Mar 2007 02:49:06 -0500 (EST)*Reply-to*: hanlonr at cox.net

Clear[x]; x[0]=1; x[n_Integer?Positive]:=x[n]=Cos[x[n-1]]; ListPlot[Table[{n, x[n]},{n,0,20}],PlotJoined->True,PlotRange->All,PlotStyle->Red]; ??x Bob Hanlon ---- traz <t_raz at yahoo.com> wrote: > Hi, this might be a silly question, but how do you do this in mathematica. > > x1 == Cos[1]; > x2 == Cos[x1]; > x3 == Cos[x2]; > > and so on ... ... so basically x(n)= Cos[x(n - 1)] > > I want to plot n against x(n). How do you do the code for this type of sequence in mathematica? >