P(n)推导
P(n)推导
已知p(1)=1;
p(n)=(1-1/(n^2))p(n-1)+2/n-1/(n^2);
请由递推公式推导出p(n)的表达式
提示:p(n)=2*(n+1)/n*(1/2+1/3+.+1/(n+1))-1;
p(n)递推公式
p(n)=(1-1/(n^2))p(n-1)+(2/n)-1/(n^2);
p(n)=(n^2-1)/n^2*p(n-1)+(2n-1)/n^2 =(n+1)(n-1)/n^2*p(n-1)+(2n-1)/n^2 n/(n+1)*p(n)=(n-1)/n*p(n-1)+(2n-1)/n(n+1) n/(n+1)*p(n)-(n-1)/n*p(n-1)=2/(n+1)-1/n(n+1)=2/(n+1)-1/n+1/(n+1) n/(n+1)*p(n)-(n-1)/n*p(n-1)=2/(n+1)-1/n+1/(n+1) (n-1)/n*p(n-1)-(n-2)/(n-1)*p(n-2)=2/n-1/(n-1)+1/n (n-2)/n-1*p(n-2)-(n-3)/(n-2)*p(n-3)=2/(n-1)-1/(n-2)+1/(n-1) …… 2/3*p2-1/2*p1=2/3-1/2+1/3 所有式子相加:n/(n+1)*p(n)-1/2*p1=(2/3+2/4+...+2/(n+1))-1/n+1/(n+1)-1/(n-1)+1/n-1/(n-2)+1/(n-1)+...-1/2+1/3 =2(1/3+1/4+...+1/(n+1))+1/(n+1)-1/2 n/(n+1)*p(n)=2(1/3+1/4+...+1/(n+1))+1/(n+1) p(n)=2*(n+1)/n*(1/3+1/4+.+1/(n+1))+1/n =2*(n+1)/n*(1/2+1/3+1/4+.+1/(n+1))-1.