数列{an}是等差数列,a1=f(x+1),a2=0,a3=f(x-1),其中f(x)=x2-4x+2,则通项公式an=( ) A.-2n+4 B.-2n-4 C.2n-4或-2n+4 D.2n-4
问题描述:
数列{an}是等差数列,a1=f(x+1),a2=0,a3=f(x-1),其中f(x)=x2-4x+2,则通项公式an=( )
A. -2n+4
B. -2n-4
C. 2n-4或-2n+4
D. 2n-4
答
∵f(x)=x2-4x+2,
∴a1=f(x+1)=(x+1)2−4(x+1)+2
=x2-2x-1,
a3=f(x−1)=(x−1)2−4(x−1)+2
=x2-6x+7,
又数列{an}是等差数列,a2=0
∴a1+a3=2a2=0,
∴(x2-2x+1)+(x2-6x+7)=2x2-4x6=0,
解得:x=1或x=3
当x=1时a1=-2,此时公差d=2,an=-2+(n-1)×2=2n-4;
当x=3时a1=2,公差d=-2,an=2+(n-1)×(-2)=-2n+4.
∴an=2n-4或an=-2n+4.
故选:C.