MathGroup Archive 2012

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

Search the Archive

Functions That Remember Values They Have Found


Hi, I was trying to create a recursive function and I read the help about it, and wrote this code

Hgeom[n_] := 
 H[n] = Sum[(1 - 0.5)^i/(1 - 0.5^i) Hgeom[n - i], {i, 1, n}]/n
Hgeom[0] = 1;

However, when I calculate Hgeom[10] it gives me the right value, and then I ask for the information about Hgeom and get that it has values calculated.

Have you any idea what could have gone wrong?



  • Prev by Date: Re: any news of new edition of The Mathematica GuideBooks?
  • Next by Date: Re: Problem finding maximum
  • Previous by thread: Re: Simplifying expressions using rules with recursion
  • Next by thread: Re: Functions That Remember Values They Have Found