,a1=3.当n≥2时,an=Sn-Sn-1=,所以12an=(an2+6an+9)-(an-1+3)2,整理得(an-3)2-(an-1+3)2=0,解得an+an-1=0,或an-an-1-6=0,当an+an-1=0时,,数列{an}是以a1=3,公比为-1的等比数列.当an-an-1-6=0时,an-an-1=6,数列{an}是以a1=3,公差为6的等差数列.
【解析】
,
∴a1=3.
当n≥2时,an=Sn-Sn-1=,
∴12an=(an2+6an+9)-(an-1+3)2,
∴(an-3)2-(an-1+3)2=0,
∴[(an-3)+(an-1+3)][(an-3)-(an-1+3)]=0,
∴an+an-1=0,或an-an-1-6=0,
当an+an-1=0时,,数列{an}是以a1=3,公比为-1的等比数列.
当an-an-1-6=0时,an-an-1=6,数列{an}是以a1=3,公差为6的等差数列.
故选D.