已知函数f(x)=x^2-4x+2,数列{an}是等差数列,且a1=f(x+1),a2=0,a3=f(x-1),求通项公式an与前n项和Sn.
问题描述:
已知函数f(x)=x^2-4x+2,数列{an}是等差数列,且a1=f(x+1),a2=0,a3=f(x-1),求通项公式an与前n项和Sn.
答
a2-a1=a3-a2-(x+1)^2+4(x+1)-2 = (x-1)^2-4(x-1)+22x^2+2-8x+4=0x^2-4x+3=0x=1 or 3if x=1a1=f(2)=4-8+2=-2a3=f(0) =2an = -2+(n-1)2 = 2n-4Sn = n(a1+an)/2 = n(n-3)if x=3a1=f(4)=16-16+2=2a3=f(2)=4-8+2=-2an...