# How to get to the formula for the sum of squares of first n numbers? [duplicate]

I know that the sum of the squares of the first n natural numbers is $\frac{n(n + 1)(2n + 1)}{6}$. I know how to prove it inductively. But how, presuming I have no idea about this formula, should I determine it? The sequence $a(n)=1^2+2^2+...+n^2$ is neither geometric nor arithmetic. The difference between the consecutive terms is 4, 9, 16 and so on, which doesn’t help. Could someone please help me and explain how should I get to the well known formula assuming I didn’t know it and was on some desert island?

Using these two expressions, and the fact that $\sum_{i=1}^ni=\frac{n(n+1)}{2}$, you can now solve for $\sum_{i=1}^ni^2$.