mariusgarbea

5 Reputation

One Badge

2 years, 152 days

MaplePrimes Activity


These are questions asked by mariusgarbea

I am trying to solve the following recursion for any n, given a constant c. Here is my code for it:

c := 2:

A[i] := rsolve({a(0) = 1/n, a(i) = ((n - i + 1)/(n - i) + 1/(c*(n - i)))*a(i - 1)}, a);

total := evala(Simplify(sum(eval(A[i], i=k), k=0..n-1)));
evalf(eval(total, n = 6));

For c = 1, I get a valid (and correct) output, however for c = 2 for example, rsolve is returning A[i] = -GAMMA(-n)*GAMMA(-n + i - 1/2)/(GAMMA(-n - 1/2)*GAMMA(-n + i + 1)), which does not make sense when n is an integer. Is there something I am doing wrong here? Not sure why this is happening. Thanks!

Page 1 of 1