等差数列{an}中,a1>0,S4=S9,则Sn取最大值时,n=_.
问题描述:
等差数列{an}中,a1>0,S4=S9,则Sn取最大值时,n=______.
答
4a1+
d=9a1+4×3 2
d,解得a1=-6d.9×8 2
∴Sn=−6dn+
n(n+1)d 2
=
n2−d 2
n13d 2
=
(n−d 2
)2−13 2
d,169 8
∵a1>0,d<0,∴当n=6或7时,Sn取最大值-
d.169 8
故答案:6或7.