等差数列{an}的前n项和为Sn,已知a3=5,a8=15. (1)求通项公式an; (2)若Sn=144,求n.

问题描述:

等差数列{an}的前n项和为Sn,已知a3=5,a8=15.
(1)求通项公式an
(2)若Sn=144,求n.

(1)∵等差数列{an}的前n项和为Sn,a3=5,a8=15.

a1+2d=5
a1+7d=15
,解得a1=1,d=2,
∴an=1+(n-1)×2=2n-1.
(2)∵a1=1,d=2,
∴Sn=
n
2
(1+2n-1)
=n2
∵Sn=144,∴n2=144,
解得n=12.