观察数列,得出下列递推关系
f(1) = 19
f(2) = f(1) + 6 * 3
f(3) = f(2) + 6 * 4
f(4) = f(3) + 6 * 5
.
.
.
f(n) = f(n-1) + 6 * (n+1)
把以上所有等式求和:
左边 = f(n) + f(n-1) + f(n-2) + ...+ f(2) + f(1)
右边 = f(n-1) + f(n-2) + ...+ f(1) + 1 + 6 * (3 +4+ .+ n-1)
左右两边消去相同的项得:
f(n) = 19+ 6 * ( 3 +4+ ...+ n-1)
等差数列求和后化简得:
f(n) = 3(n+4)(n-1) + 19