f(0)=1,f(1)=3,f(n+1)=f(n)+nf(n-1),则f(4)=
问题描述:
f(0)=1,f(1)=3,f(n+1)=f(n)+nf(n-1),则f(4)=
答
f(4)=f(3)+3*f(2)=f(2)+2*f(1)+f(1)+1*f(0)=f(1)+1*f(0)+2*f(1)+f(1)+f(0)=4*f(1)+2*f(0)=4*3+2*1=14
答
f(4)=f(3)+3f(2),
f(3)=f(2)+2f(1),
f(2)=f(1)+1f(0),
f(1)=3,f(0)=1,一层层往回代,得到f(4)=22