a1^2 + a2^2 + a3^2 + … + an^2
= (a1 + 0 d)^2 + (a1 + 1 d)^2 + (a1 + 2 d)^2 + … + [a1 + (n - 1) d]^2
= a1^2 + a1^2 + a1^2 + … + a1^2 + 2 a1 d [0 + 1 + 2 + … + (n - 1)]
+ d^2 [0^2 + 1^2 + 2^2 + … + (n - 1)^2]
= n a1^2 + 2 a1 d (n - 1) n / 2 + d^2 (n - 1) [(n - 1) + 1] [2 ( n - 1) + 1] / 6
= n a1^2 + n (n - 1) a1 d + n (n - 1) (2 n - 1) d^2 / 6
注:1^2 + 2^2 + … + n^2 = n (n + 1) (2 n + 1) / 6 是高中课本上给的公式