MathGroup Archive 2006

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

Search the Archive

Re: calculate Recurrence Equations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg68783] Re: calculate Recurrence Equations
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Fri, 18 Aug 2006 03:12:40 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <ec1a1u$omo$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Frank Hechtner wrote:
> hi,
> 
> i?m in trouble with my Recurrence Equations:
> 
> i?ve defined the following function
> 
> anteil[0] = 1
> anteil[n_] := anteil[n - 1] + (anteil[n - 1]*5 - 1)/100
> 
> i want mathematica to calculate the values for anteil[30] and so on.
> 
> Unfortunately mathematica needs for this calculation over 2 hours (and 
> is still running, athlon x2 4600, 2 gb ram).

Hi Frank,

The following definition should help:

  anteil[0]=1;
  anteil[n_]:= anteil[n]= anteil[ n-1]+ ( anteil[ n-1]*5-1)/100

anteil[30]
--> 
4909085745117164100520051333566036654601/1342177280000000000000000000000000000000

See "Functions That Remember Values They Have Found"
http://documents.wolfram.com/mathematica/book/section-2.5.9

HTH,
Jean-Marc


  • Prev by Date: RE: Several functions in a single 2D-plot
  • Next by Date: Re: Several functions in a single 2D-plot
  • Previous by thread: Re: calculate Recurrence Equations
  • Next by thread: Re: calculate Recurrence Equations