Re: Beginners Question - Series list problem
- To: mathgroup at smc.vnet.net
- Subject: [mg35664] Re: Beginners Question - Series list problem
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Thu, 25 Jul 2002 04:45:51 -0400 (EDT)
- Organization: Universitaet Leipzig
- References: <ahlga4$s3c$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
- Sender: owner-wri-mathgroup at wolfram.com
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