MathGroup Archive 2012

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

Search the Archive

Re: Functions That Remember Values They Have Found

  • To: mathgroup at smc.vnet.net
  • Subject: [mg127611] Re: Functions That Remember Values They Have Found
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Tue, 7 Aug 2012 03:02:27 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <20120806083728.AC1FE683B@smc.vnet.net>

Change H[n] to Hgeomin[n]

On Aug 6, 2012, at 4:37 AM, Esteban Gonz=E1lez Morales <yo8231 at gmail.com> wrote:

> 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?

Murray Eisenberg                                     
murray at math.umass.edu
Mathematics & Statistics Dept.      
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                  413 545-2859 (W)
710 North Pleasant Street                      fax   413 545-1801
Amherst, MA 01003-9305







  • Prev by Date: Re: Functions That Remember Values They Have Found
  • Next by Date: Re: Simplifying expressions using rules with recursion
  • Previous by thread: Re: Functions That Remember Values They Have Found
  • Next by thread: Re: Functions That Remember Values They Have Found