Can anyone tell me how to get a formula for
1^2 + 2^2 + 3^2 + ... + n^2, where n is a positive integer.

Hello, ling_c_0202!
I'll show you a primitive method for this problem.
Can anyone tell me how to get a formula for:
. ., where
is a positive integer.
Crank out the first few sums and take consecutive differences.
Then take differences of the differences, etc., until we get a constant sequence.
![]()
We get a constant sequence at the third differences.
This tells us that the generating function of of the third degree (a cubic).
We have the general cubic function: .
. . and we must determine
We will use the first four sums from our list.
![]()
.
Now we must solve the system of equations, but it's quite simple . . .
Back-substitute and get: .
Hence: .
Therefore: .

Hello, ling_c_0202 and all!
Here's another approach to Sums-of-powers formulas.
(I'll give you the 'long version'.)
If we know the "previous" sums, say: .. and .
. .we can find the "next" formula: .
Consider the next-higher power (3) and the difference of two consecutive cubes:
. .
Now letand "stack" the equations.
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . .
. . . .
Add the equations: . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . .
And we have: . . . . .
Solve for.
Factor: .
Therefore: .