Functions That Remember Values They Have Found
- To: mathgroup at smc.vnet.net
- Subject: [mg127601] Functions That Remember Values They Have Found
- From: Esteban González Morales <yo8231 at gmail.com>
- Date: Mon, 6 Aug 2012 04:37:28 -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
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?
- Follow-Ups:
- Re: Functions That Remember Values They Have Found
- From: Murray Eisenberg <murray@math.umass.edu>
- Re: Functions That Remember Values They Have Found
- From: Bob Hanlon <hanlonr357@gmail.com>
- Re: Functions That Remember Values They Have Found