# Second difference on the sum of extreme values of square numbers

I notice that in a series of consecutive square number $$1,4, 9, 16, 25, 36, 49, 64, 81, 100$$ if i add up the first element to the last element as well as the second element to the second to the last element i come up with the following result:$$101, 85, 73, 65, 61$$ the eventually get the absolute difference between 2 consecutive sum i have $$16, 12, 8, 4$$ by getting the second difference of this i got $$4,4,4,4$$ is this true to all $$n^{2}?$$ This pattern holds true even i do not start with $$1^{2}$$, that is for even number of squares, in case of odd number of squares i.e from $$1^{2}$$ to $$9^{2}$$, i can simply multiply the median, that is $$5^{2}$$, by two then do the same process the pattern still holds. I tried to prove this by letting $$n^{2}, (n +1)^{2}, (n + 2)^{2}, ..., (n+k)^{2}, (m - k)^{2}, . . .,(m - 1)^{2}, m^{2}$$ as i add both ends and perform subtraction among consecutive sums i got $$(n+k)^{2} +(m - k)^{2} - 2((n+k)^{2} + (m - 1)^{2} + . . . +(n +1)^{2} + (m - 1)^{2}) - n^{2} - m^{2}$$ but unfortunately i got stuck since I cant express sum of consecutive squares as single term,,, the internet say that its n(2n + 1)(n + 1)/6 but i cant connect this formula using expressions...any idea how to do this?

Lemma: First, realize that the difference of the difference between $$3$$ consecutive square numbers is $$2$$ $$\begin{matrix} 1&&4&&9&&16&&25&&36\\ &3&&5&&7&&9&&11\\ &&2&&2&&2&&2\\ \end{matrix}$$

Proof of lemma:

Suppose three consecutive square numbers $$n^2,~(n-1)^2,~(n-2)^2$$ Then $$n^2-(n-1)^2=2n-1$$ $$(n-1)^2-(n-2)^2=2n-3$$ $$[n^2-(n-1)^2]-[(n-1)^2-(n-2)^2]=(2n-1)-(2n-3)=2$$ Now to prove your result, suppose your series become $$n_1,n_2,n_3,\cdots,n_{k-1},n_{k}$$ What you are asking is to prove that $$[(n_{k}+n_1)-(n_{k-1}+n_2)]-[(n_{k-1}+n_2)-(n_{k-2}+n_3)]=4$$ Rewrite the equation and utilize the lemma, the result follows $$\underbrace{[(n_{k}-n_{k-1})-(n_{k-1}-n_{k-2})]}_{2}+\underbrace{[(n_{3}-n_2)-(n_{2}-n_1)]}_{2}=4$$ Surely this works for all $$n^2$$. I skipped some rigorous induction process.

Just for enrichment, the $$n^{th}$$ difference between $$n+1$$ consecutive numbers to the power of $$n$$ is $$n!$$.

For example,

$$\begin{matrix} 1&&8&&27&&64&&125&&216\\ &7&&19&&37&&61&&91\\ &&12&&18&&24&&30\\ &&&6&&6&&6 \end{matrix}$$ And $$\begin{matrix} 1&&32&&243&&1024&&3125&&7776&&16807\\ &31&&211&&781&&2101&&4651&&9031\\ &&180&&570&&1320&&2550&&4380\\ &&&390&&750&&1230&&1830\\ &&&&360&&480&&600\\ &&&&&120&&120 \end{matrix}$$

• Your perspective is great... i simply atta k the problem directly without relying on its relationship to previously established facts..Any idea how will i start ur enrichment sir? – rosa Jan 21 at 14:47
• I haven't proved it myself for now. I just observed it. – Larry Jan 21 at 15:00
• Ah okay... ur great!!. Tnx! – rosa Jan 21 at 15:11
• This is highly related to the fact that the $n$-th derivative of $x^n$ is $n!$. – Paul Sinclair Jan 21 at 15:51
• How continuous subtraction connected to nth derivative? – rosa Jan 21 at 21:15

If you have $$k$$ consecutive squares starting from $$n^2$$ and going up to $$\left(n+k-1\right)^2$$, then the sum of these $$k$$ numbers is

$$\displaystyle\sum_{a=n}^{n+k-1} a^2 = \left(\displaystyle\sum_{a=1}^{n+k-1} a^2 \right) - \left(\displaystyle\sum_{a=1}^{n-1} a^2\right)$$

This is

$$\displaystyle\sum_{a=n}^{n+k-1} a^2\,\, = \,\,\frac{(n+k-1)(n+k)(2n+2k-1)}{6}-\frac{n(n-1)(2n-1)}{6}$$