I have a function as follows $$ R_{nl}(r)=r^l e^{-\frac{\mu r}{n}}\sum_{j=0}^{n-l-1}b_j r^j \tag{1} $$ where $$ b_{j+1}=\frac{2\mu}{n}\frac{j+l+1-n}{(j+1)(j+2l+2)}b_j \tag{2} $$ and $b_0=2\mu^{3/2}$ and $\mu=1$.
Now I want to write a code for calculating $R_{nl}(r)$. So I tried this
rvals = RecurrenceTable[{b[j + 1] == (2 \[Mu])/n ( j + l + 1 - n)/((j + 1) (j + 2 l + 2)) b[j], b[0] == 2 \[Mu]^(3/2)}, b, {j, 0, n - 1}];
rvals2 = PrependTo[rvals, 2 \[Mu]^(3/2)];
rfun[n_, l_, r_] :=r^l Exp[-\[Mu] r/n] Sum[rvals[[j]] r^j, {j, 0, n - l - 1}]
but when I try for example
rfun[2, 1, r]
it doesn't give me the answer. It seems that the recurrence table needs to specify the initial values for $n$ and $l$, but I want to use rfun[n, l, r]
as a function in the next steps. Also I had tired
RSolve[{b[j + 1] == (2 \[Mu])/n (j + l + 1 - n)/((j + 1) (j + 2 l + 2)) b[j],
b[1] == 2 \[Mu]^(3/2)}, b[j], j]
for recursion relation but this does not yield my desire result too. Any idea?