I am trying to resolve this recurrence
$\left(n+1\right)a_n=na_{n-1}+1\:\:\:\:\:\forall n\ge 1\:and\:a_0\:=\:1$
What i have tried is to
- First write the homogeneous equation $a_{nh}=\frac{n}{n+1}\cdot a_{n-1}$
- Try to solve the particular solution $a_{nP}=bn+c\:\:\:$ so then we replace and try to solve for B and C $bn+c=\frac{n}{\left(n+1\right)}\cdot b\left(n-1\right)+c+\frac{1}{n+1}\:\:\:$
- Then if i find the solution for B and C what i would do is $a_n=a_{nh}+a_{nP}$
Then i got stuck because the only solution that i found was $b=\frac{1}{2n}$
We sum both sides of the equality $(n+1)a_{n}=na_{n-1}+1$ for $ n=1 , 2 ,..., N $, we have
$2a_{1}+3a_{2}+...+Na_{N-1}+(N+1)a_{N}=a_{0}+2a_{1}+3a_{2}+...+Na_{N-1}+N$ . Therefore $(1+N)a_{N}=1+N$ or $a_{n}=1$ for all integers $n\ge0$.