On Sunday 19 January 2003 09:15 pm, wang yin wrote:
> No. I don't mean I want to get a value of T(3) or T(1000), ...
>
> I want the result: T(n)=2^n-1;
>
> That's the answer to the recurence
>
> T(n)=2*T(n-1)+1, T(0)=0
>
check out differ.mac:
demo("differ.dem");
(C8) f[0]:0;
(D8) 0
(C9) f[n+1]=2*f[n]+1;
(D9) f = 2 f + 1
n + 1 n
(C10) difference(%,f[n]);
n
(D10) f = 2 - 1
n
differ.mac in the share/algebra solves 1st and second order recurrence
equations.
Osman