Essentially I'm curious; could a perfect square($x$ squared) be less than the sum of all lesser perfect squares by a perfect square, and if so, what would the smallest solution be. Take $36$ for example, $36 < 25+16+9+4+1$ by $19$, $19$ is not a perfect square.
$\dfrac{(x(x+1)(2x+1))}{6}$ sums the squares so I substitute $x-1$ and take away the highest square and I get $\dfrac{(x(x-1)(2x-1))}{6}-x^2=$ "Perfect Square" how would you find if there exists any integers $x$ that satisfy such an equation?
Thank you!
Picking up where Prometheus left off:
The forgotten case $x = 3a^2,\, y = 2b^2$ produces
$$\begin{align} 2b^2 &= 18a^4 - 27a^2 + 1\\ \iff 16b^2 &= 144a^4 - 216a^2 + 8 = (12a^2 - 9)^2 - 73\\ \iff 73 &= (12a^2 - 9)^2 - (4b)^2 = (12a^2-9-4b)(12a^2-9+4b). \end{align}$$
$73$ is prime, so that forces $12a^2 - 9 - 4b = 1$ and $12a^2-9+4b = 73$, whence $b = 9$ and $12a^2 = 1 + 4\cdot 9 + 9 = 46$ which obviously is impossible.
Then, looking further at the case $x = 6a^2,\,y = b^2$ and the equation
$$\begin{align} b^2 &= 72a^4 - 54a^2 + 1\\ \iff 8b^2 &= (24a^2)^2 - 2\cdot 9(24a^2) + 8 = (24a^2 - 9)^2 - 73\\ \iff 73 &= (24a^2 - 9)^2 - 2(2b)^2. \end{align}$$
The equation $u^2 - 2v^2 = 73$ has infinitely many solutions, but none of them has the required form.
The ring $\mathbb{Z}[\sqrt{2}]$ is Euclidean, hence factorial. The rational prime $73$ is reducible in $\mathbb{Z}[\sqrt{2}]$, $73= (19 + 12\sqrt{2})(19-12\sqrt{2})$, and all solutions of $u^2 - 2v^2 = 73$ arise from the solution $u = 19,\, v = 12$ by multiplication with a unit of norm $+1$. The smallest solution of $x^2 - 2y^2 = 1$ is $x = 3,\, y = 2$, so all solutions are generated by $(3+2\sqrt{2})^k(19+12\sqrt{2})$. Looking at the remainders modulo $24$ of the solutions, we find a short period,
$$(19,12),\, (9,2),\, (11,0),\, (9,22),\, (19,12)$$
and the cycle closes. The first component never has the remainder $-9 \equiv 15 \pmod{24}$.
Thus:
$$\frac{x(x-1)(2x-1)}{6} - x^2$$
is never a perfect square.