数列{an}的通项公式an=ncosnπ2+1,前n项和为Sn,则S2012=_.

问题描述:

数列{an}的通项公式an=ncos

2
+1,前n项和为Sn,则S2012=______.

因为cos

2
=0,-1,0,1,0,-1,0,1…;
∴ncos
2
=0,-2,0,4,0,-6,0,8…;
∴ncos
2
的每四项和为2;
∴数列{an}的每四项和为:2+4=6.
而2012÷4=503;
∴S2012=503×6=3018.
故答案为    3018.