Maybe easier ways to do this......but.....using the sum of differences we have
1 5 14 30 55
4 9 16 25
5 7 9
2 2
We have 3 non-zero results so we can express the progessive sums as a cubic polynomial
an^3 + bn^2 + cn + d where n is the sum of the first n squares
We have that
a(1)^3 + b(1)^2 + c(1) + d = 1
a(2)^3 + b(2)^2 + c(2) + d = 5
a(3)^3 + b(3)^2 + c(3) + d = 14
a(4)^3 + b(4)^2 + c(4) + d = 30
a + b + c + d = 1
8a + 4b + 2c+ d = 5
27a + 9b + 3c + d = 14
64a + 16b + 4c + d = 30
The solution to this is
a = 1/3 b = 1/2 c =1/6 d = 0
So.....the resulting polynomial is
(1/3)n^3 + (1/2)n^2 + (1/6)n
So.....the sum of the first 1000 squares is
(1/3) (1000)^3 + (1/2)(1000)^2 + (1/6)(1000) =
333,833,500