等差数列{an}
a(n) = a1 + (n - 1)d
前n项和S(n) = (2*a1 + (n-1)d) * n / 2 ---------记忆方法:梯形公式:(首项+末项)×项数/2
所以:a(2) =a1 + d =16 ①
a(4) =a1 + 3d =24 ②
a1 = 12 d = 4 ---------------其实 d = (am - an) / (m - n) = (24 - 16) / (4 - 2)
a(n) = a1 + (n - 1)d = 12 + 4(n - 1) = 4n + 8
S(n) = (2*a1 + (n-1)d) * n / 2 = (2*12 + 4(n-1)) * n / 2 = n(2n + 10)