已知函数y={f(1)=1,f(n+1)=f(n)+2n}n属于正整数,求f(2),f(3),f(4),f(5),f(n)的值

问题描述:

已知函数y={f(1)=1,f(n+1)=f(n)+2n}n属于正整数,求f(2),f(3),f(4),f(5),f(n)的值

f(n+1)=f(n)+2n=f(n)+(n+1)^2 - n^2 - (n+1) + n
f(n+1)-(n+1)^2 +(n+1) = f(n) - n^2 + n = ...= f(1) - 1 + 1 = 1
f(n)=n^2 - n + 1
f(2)=3
f(3)=7
f(4)=13
f(5)=21