Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: defining a recursive function

  • To: mathgroup at
  • Subject: [mg54886] Re: [mg54870] defining a recursive function
  • From: "David Park" <djmp at>
  • Date: Sat, 5 Mar 2005 01:34:30 -0500 (EST)
  • Sender: owner-wri-mathgroup at


pr[R_] := R*(i + 1) - a

f[n_] := Nest[pr, r, n]

-a + (1 + i) (-a + (1 + i) (-a + (1 + i) (-a + (1 + i) (-a + (1 + i) r))))

You can't use N as a symbol because it has a defined meaning in Mathematica.

If you are new to Mathematica and intend to make much use of it, you would
do well to work through most of Part I in the book, typing in the commands
and familiarizing yourself with the syntax and basic commands.

David Park
djmp at

From: lou zion [mailto:illuzioner at]
To: mathgroup at


i have a function

pr[R_] := R*(i+1) -a

and i need to define f as:

f[N_] := pr[pr[pr[pr[R]]]]     to N levels deep

how can i do this?



  • Prev by Date: Setting the ResultFormat in a ASP.NET WebApplication.
  • Next by Date: Re: Goto Line ?
  • Previous by thread: defining a recursive function
  • Next by thread: defining a recursive formula?