Using RSolve I tried without success to convert the recursive relation to a non-recursive function. How can I do this?

a[0] = c1;
a[n_] := -c2/n Sum[ (n - k) c3^(n - k) a[k], {k, 0, n - 1}];

for n$\ge$0 and being c1,c2,c3 some positive constants.


2 Answers 2


I do not know if one can get RSolve to do this, my guess is no, but I evaluated

(* 1/2 c1 (-2+c2) c2 c3^2 *)

(* -(1/6) c1 c2 (6-6 c2+c2^2) c3^3 *)

(* 1/24 c1 c2 (-24+36 c2-12 c2^2+c2^3) c3^4 *)

The structure is quite transparent, except for some polynomial in c2 in each case. The coefficients for those polynomials are in A066667 and it was then easy to see that an explicit formula is

(* only valid when n>0 *)

For example

(* 0 *)

This is just an extension of the previous answer of @user293787

Instead of


one could also use:

aexplicit2[n_] := -1/n*c1*c2*c3^n*Sum[(Gamma[n + 1] (-c2)^k)/(Gamma[k + 2] k! (n - k - 1)!), {k, 0, n}]


aexplicit3[n_] := -c1 c2 c3^n Hypergeometric1F1[1 - n, 2, c2]

However, none of these expressions correctly treats the case n=0. The only way I could think of is to use Piecewise for cases n>0 and n==0.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.