MathGroup Archive 2005

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

Search the Archive

Re: defining a recursive formula?


lou zion wrote:
> can someone help me represent the following?
> 
> i have a quantity p[R_] := i* R -a
> 
> i need to compute
> 
> F[N_]  := p[p[p[p[p[R]]]]]  to N levels deep.
> 
> how can i do this? thanks!
> 
> lou

In[1]:=
p[R_] := i*R - a

In[2]:=

Nest[p, R, 5]
Out[2]=
-a + i*(-a +
     i*(-a + i*(-a +
         i*(-a + i*R))))

-- 
Curt Fischer


  • Prev by Date: Kernel Problem
  • Next by Date: Re: help browser cells inactive?
  • Previous by thread: Re: defining a recursive formula?
  • Next by thread: Re: defining a recursive formula?