MathGroup Archive 2002

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

Search the Archive

Re: Beginners Question - Series list problem


Hi,

you need NestList[], here is a FactorialList[] with NestList[]

FactorialList[n_Integer] := 
  NestList[{#1[[1]] + 1, #[[2]]*(#1[[1]] + 1)} &, {1, 1}, n - 1]

Regards
  Jens

Baz wrote:
> 
> I am trying to generate a list of numbers where the number being
> calculated is dependant on the previous list member.
> 
> What I (think I) need is a function, like
> SeriesTable[expr,{InitialValue,imax}] where IntitialValue will be the
> first value in the list and expr will be evaluated on this value to
> form the second value and so on Imax times.
> 
> My attempts to write such a function have failed miserably. Please
> help ... Barry


  • Prev by Date: Re: troubles with lists
  • Next by Date: Re: Beginners Question - Series list problem
  • Previous by thread: Re: Beginners Question - Series list problem
  • Next by thread: troubles with lists