MathGroup Archive 2004

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

Search the Archive

Re: Help on a recursive function


DrBob wrote:
> If I've copied the definition right, here are a few terms for H = 1, 2, and 3:
> 
> Clear@p
> p[H_][i_Integer] /; 0 <= i < H := p[H][i] = a(1 + b)^i
> p[H_][i_Integer?Positive] := p[H][i] =
>    Simplify[(1 + b)p[H][i - 1] - b p[H][i - H]]
> 
> p[1] /@ Range@5
> {a, a, a, a, a}

Hello Bobby,
thank you for your attention first of all; I made a *mistake* in the 
previous formula; instead of:

>>P(i) = (1+b)P(i-1) - b P(i-H)    i>= H

the true formula is:

P(i) = (1+b)P(i-1) - b P(i-H-1)    i>= H

that is "P(i-H-1)" instead of "P(i-H)"

and the limit where:

a / (1-b)

so, the complete formal is:

P(i) = a(1+b)^i     i=0, ..., H-1

P(i) = (1+b)P(i-1) - b P(i-H-1)    i>= H

any idea for its expression in a closed form?

smoll-est


  • Prev by Date: Sequential evaluation of lists
  • Next by Date: Re: An argument pattern problem: ranges and lists
  • Previous by thread: Re: Help on a recursive function
  • Next by thread: Re: Re: Help on a recursive function