MathGroup Archive 2006

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

Search the Archive

Re: how to iterate


On 4/24/06 at 6:02 AM, valentino.rossi.85 at gmail.com (vr) wrote:

>pls excuse my ignorance. i'm still new to mathematica, and i forgot
>much of what i had learned.

>how can i list the output of the function below for n=4..2006? f(n)
>= ( f(n-1) + f(n-2) + 1 ) / f(n-3) given f(1)=1, f(2)=2, f(3)=3.

There are a number of ways to achieve this. One of the simpler is:

Table[(f[n-1]+f[n-2]+1)/f[n-3], {n, 4, 2006}]

another way to get the same result would be

(f[#-1]+f[#-2]+1)/f[#-3]&/@Range[4,2006]
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: how to iterate
  • Next by Date: Re: how to iterate
  • Previous by thread: Re: how to iterate
  • Next by thread: Re: how to iterate