For which values of $n$ the sum $\sum_{k=1}^n k^2$ is a perfect square? Question. For which values of $n$ the sum $\sum_{k=1}^n k^2$ is a perfect square?
Clearly, $n=24$ is one such value, and I was wondering whether this is the only value for which the above holds.
The question is equivalent to finding the positive integer solutions of the Diophantine equation
$$
n(n+1)(2n+1)=6N^2.
$$
The first thing to observe is that the numbers $n,n+1$ and $2n+1$ are pairwise relatively prime, and one we divide one of the them by 2 and one of the them by 3, the resulting three numbers should all be perfect squares. This leads to a combination of Pell's equations. It seems to me that there should be a simpler way to solve it. 
 A: Partial answer - all the easiest cases eliminated. One hard case remaining.
First, since $n,n+1,2n+1$ are pairwise relatively prime, this means that we can consider the different factorings $6=abc$ with $c$ odd, and we then need $n=ax^2,n+1=by^2,2n+1=cz^2$ for some integers $x,y,z$ with $xyz=N$. 
This gives us the options for $(a,b,c)$:
$$(1,6,1)\\(2,3,1)\\(6,1,1)\\(1,2,3)\\(2,1,3)$$
If $(a,b,c)=(1,6,1)$ you need $6y^2-x^2=1$ which is not possible modulo $3$.
If $(a,b,c)=(2,3,1)$ then you need $z^2-6y^2=-1$, which is not possible modulo $3$.
If $(a,b,c)=(3,2,1)$ then you need $z^2-4y^2=-1$, which is not possible, modulo $4$.
If $(a,b,c)=(2,1,3)$ then you need $3z^2-x^2=1$, which is not possible.
If $(a,b,c)=(2,3,1)$ then you need $z^2-4x^2=1$, so $(z-2x)(z+2x)=1$, which is not possible unless $x=0,z=1$, yielding $N=0$.
So the only hard case is $(a,b,c)=(6,1,1)$. 
The case $n=24$ actually gives us $(a,b,c)=(6,1,1)$. so you'd need to prove that there is only one solution $(x,y,z)$ to:
$$z^2-12x^2=1\\z^2-2y^2=-1$$
The known solution corresponding to $n=24$ is $(x,y,z)=(2,5,7)$.
I'm stuck on how to prove there is no other solutions, however.
Since they are Pell-like, we know how to generate all $(z,y)$ with $z^2-2y^2=-1$ and all $(z,x)$ with $z^2-12x^2=1$, but I'm not sure how to show there aren't any other intersections between the two sets of $z$ values.
